Commit Graph

165 Commits

Author SHA1 Message Date
Jon Miranda
6f455b583f Fix sizing of FloatingIconView so that it matches the workspace.
* Added a cross fade at the end for text and shadows.
* Animate in FolderIcon bg/dot/text after swapping.

Bug: 129297366
Change-Id: Ieeb5d7b8fb389a2f7ee263d38b3021ffdefefd93
2019-03-27 09:42:50 -07:00
Sunny Goyal
371ea051d1 Fixing launcher UI not reapplied properly when IDP changed as a result of display changes
> Removing unnecessary check when binding model data as its safe to bind old data,
  we should just not persist it (that check is already there in model writer)
> Adding additional check in model bind to skip old bind if there are multiple binds

Bug: 126259547
Bug: 118441555
Change-Id: Ic250d2af13797d3e70c6e1fc70da65ebe6ab8d70
2019-03-06 15:41:29 -08:00
Hyunyoung Song
a23738540e Fix BubbleTextView visibility
Change-Id: I176d7c8b77f6c2d929217c3f9b4dbc3e942e48fc
2019-01-04 12:01:32 -08:00
Hyunyoung Song
ef468d80d8 Do not animate icon if work profile is disabled
Bug: 119884907

Change-Id: I14977581dcb42b5fb2fe21f628a4d91945fdd614
2019-01-03 17:23:43 -08:00
Tony Wickham
f34bee819c Rename "badges" to "dots" where appropriate
This will reduce confusion with the other "badging" concept we use for,
e.g. work profiles. It is also consistent with the external name
"notification dots".

Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
2018-12-04 10:46:40 -08:00
Tony Wickham
8912b04c80 Move BadgeRenderer to iconloader library
- Rename BadgeRenderer to DotRenderer
- Move drawing parameters to new class DrawParams
- Add leftAlign param
Change-Id: I69de56c13280ba5e7e1ea3868c23edfac01012e9
2018-11-30 16:28:56 -08:00
Sunny Goyal
fe8e4a90be Moving some methods from various activities to the base interface
This allows creating some custom views in the absence of
activity context

Bug: 118758696
Change-Id: I23999290e972a2a8cbd725a521a4e0c7c2e5023e
2018-11-19 13:04:35 -08:00
Sunny Goyal
066ace1b88 Replacing setAlphaComponent with setAlphaComponentBound for better animation interpolation
setAlphaComponent throws expetion for invalid range, which can cause brashes in overshoot
interpolation

Bug: 118390004
Change-Id: Ic9c5ff3d660eba353b982c4c47ccfaf329b3e296
2018-11-06 09:59:03 -08:00
Tony Wickham
c6dc0c24ec Merge "Change long press timeout to use a factor of ViewConfiguration.getLongPressTimeout()" into ub-launcher3-master 2018-09-26 00:01:12 +00:00
Tony
2ca999cf1b Change long press timeout to use a factor of ViewConfiguration.getLongPressTimeout()
This way, if the default ViewConfiguration timeout changes, we will adjust accordingly.

Bug: 113639506
Change-Id: Ic3b93311c8e8d8196db2850fa641ffc675a16fb2
2018-09-24 17:24:51 -04:00
Sunny Goyal
f840f10d50 Removing additional rpc due to icon cache update
When launcher loads, it fetches the list of apps twice, once for
loading all-apps and again for updating icons. Instead reusing
the previously fetched apps list.
Also moving the icon loading in a separate package for further
generalization

Change-Id: Ibd2dae56e6027a31b633da030bc6b43a90b27e1b
2018-09-21 15:27:03 -07:00
Sunny Goyal
2b787e5bd6 Using a placeholder icon shape instead of low-res/blurry icon
Bug: 111142970
Change-Id: I867224464ae9c026f4dcb5256ef14fc39c8e751d
2018-08-27 10:43:46 -07:00
Tony
4043b05cde Cancel badge scale anim when setting new badge scale
Otherwise it's possible the badge scale animation will override the
non-animated set value, which could mean a badge continues to show
even though it shouldn't:
- Animate badge scale to 1
- Before animation finishes, set badge scale to 0
- Badge scale ends at 1, since animation wasn't cancelled, so we
  continue to show it indefinitely

Also exported some properties in case a similar issue arises.

Bug: 111791593
Change-Id: Ia1a417239b909886adf9351e9bdc06a3b22d8b73
2018-08-17 13:47:39 -07:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Tony
05d98c246b Adjust notification dots
- Use consistent bounds for folders as other icons, to ensure dot
  has a consistent placement (moved right+up a bit)
- Strengthen the ambient shadow to improve contrast
  - Increased blur size and opacity
- Use a dark gray rather than black for dots on dark folders

Bug: 73331123
Change-Id: I888f4645d3a48465af93f5003dda8f8b7c3129f3
2018-07-23 16:41:45 -07:00
Sunny Goyal
ed7a6937cb Unifying and maintaining the text-alpha and text visibility property
Bug: 76228194
Change-Id: I70be5f9fd22c53864a9a0308f256baa7dc1f3ab7
2018-04-17 20:08:10 +00:00
Sunny Goyal
2e38cf4825 Merge "Changing the overviewState to show appsearch and floating header" into ub-launcher3-master 2018-03-20 17:01:49 +00:00
Sunny Goyal
7185dd63eb Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
2018-03-19 20:02:34 -07:00
Sunny Goyal
66dccad6ff Disabling unnecessary requestLayout calls in BubbleTextView
> Disabling layout change when updating icon, if previously set
> Setting the ellipsis behavior to end, to disable relayouts when
  changing text

Change-Id: Ic00c207c0372724daebd8ee1d748f5cf5aa56457
2018-03-19 12:02:53 -07:00
Sunny Goyal
0b0847b272 Fixing taskMenu and taskView clicks in fallback activity
> Extracting common methods from Launcher & DragLauncher to base classes
> Remoting some dependencies on Launcher and using the base class instead

Change-Id: I121cacf8a14190b4703cda60bdeb4f79eee69ded
2018-03-15 17:29:43 -07:00
Sunny Goyal
726bee7d5d Removing click-feedback shadow generation logic in BubbleTextView
Instead of animating the shadow, animating the icon scale. This avoids
unnecessary bitmap creating at app-launch and also plays nice with the
app-launch transition

Change-Id: I1d3d24bc7212a6d659855ff1002a45388e269e52
2018-03-05 14:56:38 -08:00
Jon Miranda
d82c5cd2b0 Set disabled state when getting new icon from DrawableFactory.
Change-Id: Ic9c508d24cc0e65d45f5c1f4bcbe8d5cd7fb9200
2018-02-27 10:12:03 -08:00
Tony Wickham
305e920048 Add notification count to content description for badged apps
Bug: 70389249
Change-Id: If7f43941d501ba807adbb33d489da3944c012e94
2018-02-05 10:08:52 -06:00
Sunny Goyal
179249d804 Dominant color is part of icon cache
> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
2018-01-03 16:55:58 -08:00
Android Build Merger (Role)
31a07c9340 [automerger] Also reset mBadgeScale to 0 when recycling view. am: 48043ee0d6
Change-Id: I45edb03913e7cad7f670be5e5331896c30662bcc
2017-11-01 23:01:31 +00:00
Jon Miranda
48043ee0d6 Also reset mBadgeScale to 0 when recycling view.
When left as 1f, the drawBadgeIfNecessary thinks that there
is still a badge -- which results in a NPE when trying to draw
the badge.

Bug: 68324671
Change-Id: I4eedb5825b3a6429c99de0466a77d368a39b1951
2017-11-01 16:01:13 -07:00
Android Build Merger (Role)
232d7196fa [automerger] Fix bug where recycled BubbleTextView kept their badges. am: 5254944a68
Change-Id: Icb486e7a529aae15d5f959487c489ef1ad5798b1
2017-10-26 18:35:10 +00:00
Jon Miranda
5254944a68 Fix bug where recycled BubbleTextView kept their badges.
Bug: 68324671
Change-Id: Id5f4db6706afd002242d95d44422fc61042798c8
2017-10-26 11:34:55 -07:00
Sunny Goyal
3dce5f3f50 Merging duplicate logic for deferred drop handling in Worksace and Folder
> All the logic is contained in UninstallDropTarget
> Also fixing a bug were mWaitingForResume was not cleared

Bug: 34692289
Change-Id: I617475ce53062902d6817954fb608198e6e03d3c
2017-10-06 09:07:36 -07:00
Mario Bertschler
230612f502 Fixing content description of a promise icon that is fully downloaded.
Bug: 65779803
Change-Id: I912a70310c6a44f0b0b443cebf77608fd19bdc71
2017-09-27 17:05:21 -07:00
Mario Bertschler
8ff9e1d679 Integrating suggested app by handling new status flags for shortcut items.
Guarded via feature flag SUGGESTED_APP.

Bug: 62483883

Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
2017-08-24 12:23:06 -07:00
Jon Miranda
7f522a25c3 Optimizations to reduce all apps jank.
* Since adding springs to the apps in All Apps, it is no longer
  efficient to build a hardware layer for it.
* Pre-uploads bitmaps to RenderThread.
* Only add overview animations if we are transitioning to/from it.

Bug: 63711551
Change-Id: I948267598e95ec59dc156acb9abe6b5b789110c0
2017-08-02 12:41:33 -07:00
Tony
7308cde2ca Don't fade in text if icon is in hotseat
Bug: 63011217
Change-Id: Ie914fcdfd0bf36b0cf12cc54f4e93206aa1074bd
2017-06-28 13:47:18 -07:00
Sunny Goyal
4e5a878bc4 Fixing two different implementations for animating text alpha
The animator in BubbleTextView maintains an internal state which was getting
invalidated by the FolderAnimator.

Change-Id: I53885fe8f1773ca62fe59f1712056f02ff9a749f
2017-06-23 11:02:02 -07:00
Sunny Goyal
9314b7c01d Separating double shadow logic for BubbleTextView in a separate subclass
This allows better customization and reuse of the double shadow logic and simplified
various attribute management

Change-Id: I5e277d8399756385452d8bb8c0a0107234a76d34
2017-06-23 10:37:25 -07:00
Sunny Goyal
828b11e5a9 Setting the callback for previewItems to folderIcon. This allows the FolderIcon to get updated
without going through the child'draw pass.
Also simplifying the draw code for the FolderIcon to remove any cycling invalidate calls

Bug: 62900800
Change-Id: I17009a5347a1c3c35426313ac759e0240ce6a395
2017-06-22 10:25:43 -07:00
Jon Miranda
2ef1ab4017 Show and update preload icons when they are in a FolderIcon preview.
Bug: 62626549
Change-Id: Ie0ad06d0239dccb8d8388381ffe845c4bbc079d6
2017-06-20 11:05:34 -07:00
Jon Miranda
0966072c91 Portrait grid changes for Workspace/All Apps.
Bug: 37015359
Change-Id: Ifbdd0e71c36e532b189e02283e3eeb562ebe2654
2017-06-19 17:02:45 -07:00
Tony
8f402808e4 Fade original icon's text in as popup closes
Bug: 62444131
Change-Id: If8f91d8455a5952d252f9cdd1b211afb5ee035c7
2017-06-16 17:24:54 -07:00
Sunny Goyal
325b5c7a66 Some theme fixes
> workspaceTextColor was not clearly defined to white and relied on HomeScreenElementTheme
> Not all attributes were defined in sw720dp. Created a interm style to avoid such errors
> Applying proper tint to resize frame
> Fixing shadow colors for homescreen icon

Change-Id: If8441011c968291de50b2fd8d7612ce3d5353b95
2017-06-11 20:24:02 -07:00
Tony Wickham
0ecf5bcfcb resolve merge conflicts of 7092db024 to ub-launcher3-dorval-polish
Test: I solemnly swear I tested this conflict resolution.x
Change-Id: I0f9ed3d42fcb04299c3c23d06629f855614c0538
2017-06-08 15:49:07 -07:00
Tony Wickham
7092db0241 Add support for color extracted notification dots
Changing the badge_color in colors.xml to transparent
will cause them to be color extracted.

When an extracted color is used in the IconPalette, we
desaturate the background. Otherwise we respect the
exact color specified in colors.xml.

Change-Id: Ie82d0c5335fa5f24d4cc47766e4c1719c4916f8b
2017-06-08 21:08:47 +00:00
Mario Bertschler
a693694502 Dark color on super light wallpaper support
Change-Id: I0fdfa9abefb72e06c45b1f635ac97e2acfa97f05
2017-06-07 15:25:07 -07:00
Tony
17b7f9bdf4 Don't hide text in pre-drag when opening popup above icon
Bug: 38468930
Change-Id: Id03162af829a00442d1db0a93f7e9d8bcb998b1a
2017-05-24 10:50:41 -07:00
Tony Wickham
3720c69322 resolve merge conflicts of 8af16760d to ub-launcher3-dorval-polish
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I4cdfeebd09be58270c249429104d91dc9a31b49c
2017-05-19 12:17:02 -07:00
Tony Wickham
d5dbf61757 resolve merge conflicts of 02aced978 to ub-launcher3-dorval-polish
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ib44ce0130b9eb01c354f18326d7d3a1eeb2c5eb8
2017-05-19 10:52:19 -07:00
Tony Wickham
8af16760dc Merge "Update accessibility for popup" into ub-launcher3-dorval 2017-05-18 01:06:46 +00:00
Tony Wickham
e6a790e5ae Use a single color for all icon badges.
Bug: 38346375
Change-Id: I26b7ad3dcfea6a18e169d656e19605c9794eadd3
2017-05-16 13:04:23 -07:00
Tony
18c4aa458e Update accessibility for popup
- Content description includes count of notifications.
- Notifications have a dismiss action.
- All icons that support shortcuts will have action to show
  shortcut menu, since there will be system shortcuts even if
  there are no deep shortcuts.

Bug: 36564782
Change-Id: I51b085fa26754f2dcd93c7db6548f2edf054f494
2017-05-11 13:59:52 -07:00
Tony Wickham
f73161b883 Support notifications with 0 count (show as dots)
am: 0530e8c608

Change-Id: I6ec98b093fbd297d2f57bea91c0eb6b051c4b3c5
2017-04-27 03:01:02 +00:00