Commit Graph

24 Commits

Author SHA1 Message Date
Jon Miranda
2b823f452b Show icon in PendingAppWidgetHostView immediately.
Before this change, PendingAppWidgetHostView would appear 'blank'
until they were loaded -- which could take a while depending on
how many apps the user had, because the all apps icons are loaded
first.

Bug: 36815047
Change-Id: Ia7449cce4341ed9e9384fc8aaadeaae6c33bb262
2017-05-03 17:05:41 -07:00
Jon Miranda
5150d59603 Add padding to pending widget background.
Bug: 36450202
Change-Id: I12c754d0ff1ac2f9a63d2e475bff5524fe51cb57
2017-03-20 14:51:43 -07:00
Sunny Goyal
1f3f07d47c Simplifying some launcher themes
> Replacing some colors with theme attributes
> Simplifying styles definition by removing unnecessary inheritance and inlining some definitions

Change-Id: Ifa167515cae6a7fd3720f1a52ff9ce11abb4495f
2017-02-16 15:24:37 -08:00
Sunny Goyal
d5d5e22715 Updating widget tray theme
Using standard theme attributes rather than custom color codes, so
that it plays nice with system theme changes.

Bug: 34819119
Bug: 34897402
Bug: 21446746
Change-Id: I265fba3ceae8873650fd09e4704838d313155e83
2017-02-09 10:16:22 -08:00
Sunny Goyal
96ac68a481 Updating the PreloadIconDrawable
> The drawable gets the path from MaskIconDrawable path, instead of
  using a circle
> The progress changes are animated as well

Bug: 34831873
Change-Id: I4e7f0b610f4fd94de8e0cfcf8b179b775cf0b4d8
2017-02-06 10:43:27 -08:00
Sunny Goyal
2d7cca1e05 Updating PendingAppWidgetHostView to load icon on the background thread
Bug: 21325319
Change-Id: I0886eec5a3f36f5e1ac18020c54891a56bdb5ed2
2017-01-05 13:55:35 -08:00
Sunny Goyal
a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Sunny Goyal
621e200647 Merge "Simplifyling widget inflation and addition flow." into ub-launcher3-master 2016-12-08 00:46:10 +00:00
Sunny Goyal
55cb70bf70 Adding an overridable DrawableFactory to allow creating custom icon drawables
> Adding ItemInfo as a parameter for creating drawable

Change-Id: I793acb0381d2b8df4db0a08317dddf1464788ebc
2016-12-07 15:55:47 -08:00
Sunny Goyal
d5462aa31b Simplifyling widget inflation and addition flow.
> Removing insert parameter used to select the index of the view.
  ShortcutAndWidgetContainer no longet relies on the index and instead
  uses x and y to refer a particulat view.
> Creating helper methods to easily insert the icon by passing ItemInfo
  directly. LauncherModel.addItemToDatabase synchronously updates the
  ItemInfo with proper postion information. So we can directly use the
  info instead of passing each parameter separately.

 Bug: 32904959

Change-Id: I021c1b818f2f42604b95a6970e06aacc7211292a
2016-12-07 13:16:08 -08:00
Tony Wickham
6b910a235d Keep disabled FastBitmapDrawables disabled while fast scrolling.
Previously, they were animating to be colored because they were
set to have a FAST_SCROLL_UNLHIGHLIGHTED state. Now they retain
their disabled color when changing fast scroll states.

Specfically, we remove the DISABLED state and instead make it a
property of the FastBitmapDrawable.

Bug: 32642959
Change-Id: I6cb2da134a550c267eebfc756eff8c91a33f028c
2016-11-11 10:59:17 -08:00
Sunny Goyal
a5c8a9eb66 Adding logic to pull in workspace data from another Launcher3 based
provider. This allows OEMs to keep the user's homescreen intact while
changing the default home app package.

Bug: 28536314
Change-Id: Ibebfd7dd33aa2cbd9ca28d2d611dd0a4a5971444
2016-07-09 16:19:26 -07:00
Sunny Goyal
d478c83fd6 Showing a permission dialog when a restored widget is not yet bound, and launcher
does not has the permission to bind the widget

Change-Id: I51d32b9958f82671b928d559105129261fb8f268
2016-05-26 17:44:29 -07:00
Sunny Goyal
5845bea514 Preventing crash when there is not enough width to show the pending text
Bug: 26901856
Change-Id: I03c9631ce224cce76b2c896a5e6ce6b0ee741782
2016-02-23 16:43:23 -08:00
Sunny Goyal
a682a5d8c7 Make sure that the dimensions are not negative when drawing pending widget
Bug: 24585203
Change-Id: I3d328d0e1fe81d2704bb5b9d4b340a367bfb9249
2015-10-01 19:36:59 -07:00
Winson
c088049113 Highlighting sectioned apps on fast-scroll.
- This CL fixes an old assumption we had about the height
  of rows in AllApps, and ensures that we account for the
  difference in height between the predictive icons and the
  normal icons.
- In addition, we refactor FastBitmapDrawable to have multiple
  states, which it manages in drawing itself, including the
  press state and fast scroll focus states.  And we also refactor
  some of the fast scroll logic in the all apps recycler view
  out to its own class.

Change-Id: I1988159b2767df733bbbfc7dc601859cde6c9943
2015-09-28 17:32:19 -07:00
Sunny Goyal
9fc953b94d Version code cleanup
> Renaming Lmp to Lollipop
  > Lollipop_MR1 instead of directly using 22
  > Using M APIs directly instead of reflection

Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
2015-08-17 13:26:01 -07:00
Sunny Goyal
ac36643be1 Updating the UI for the pending widget view
Bug: 23183034
Change-Id: I2b3f6f765a51edf75e666186650bbd3cf7b66a7a
2015-08-17 11:16:31 -07:00
Sunny Goyal
53d7ee4285 Fixing different bitmap sizes in different orientations
> Using a single bitmap icon size
> Picking up appropriate density for satisfy the required icon size
> Fixing some icon size assumptions during icon animations

Bug: 19514688
Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
2015-06-03 19:07:44 -07:00
Adam Cohen
2e6da1539b Refactoring DeviceProfile
-> Pulling out the parts of device profile which can (and need to be)
   initialized and accessed without access to an Activity context,
   ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
   initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
   and we will create one of these for each Activity instance, and
   this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
   all appropriate dimensions can be computed without an Activity
   context (by only specifying orientation). This would be an
   extension of this CL and allow us to know exactly how launcher
   will look in both orientations from any context.

Sets the stage for some improvements around b/19514688

Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
2015-05-21 16:16:40 -07:00
Sunny Goyal
9b4b0812fe Showing widgets in a disabled state, when running in safe mode
Bug: 15172107

Change-Id: I7209836ca4ffacde7b7b232e230e9b9f1a0e54bb
2014-10-16 11:20:41 -07:00
Sunny Goyal
e7b8cd9e4f Improving restored widget behavior
> Clicking a broken widget install shows a dialog similar
to an app icon
> Clicking remove on the dialog removed all components
for the corresponding package
> Widget pending view shows 'Setup' text instead of icon,
if there is enough space

Change-Id: I82ec0a1ee9542c1e3b860e6e00798a80450dce3c
2014-08-27 14:07:05 -07:00
Sunny Goyal
0fc1be164e Updating the ui for widget restore flow
> Pending widget show a PreloadIconDrawable to indicate
installation progress
> Only the concerned widgets are reinflated on package
install and not the whole workspace.
> Adding support for storing default package icon in
IconCache

issue: 10779035
issue: 16737660

Change-Id: Id787ae4a5ef72d6e01aeb5a1bae5ab8840037679
2014-08-12 16:00:03 -07:00
Sunny Goyal
ff57227711 Adding support to restore widgets even for jelly beans.
> Show 'widget-not-ready' until the widget app is installed
> Once the app is installed, bind a new widget id (not required on L if
  id-remap was received).
  **Remove the widget if bind failed
> If the widget has no configuration screen, show the widget, otherwise
  show 'setup-widget'.
> Clicking 'setup-widget' shows the config screen, and updates the
  widget on RESULT_OK.

issue: 10779035

Change-Id: I2f8b06d09dd6acbc498cdd93edc59c26e5ce17af
2014-08-08 14:29:02 -07:00