Commit Graph

19 Commits

Author SHA1 Message Date
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
Tony Wickham
9438ed414f Add swipe-to-dismiss notifications in popup menu.
- Next secondary icon animates up to replace dismissed main notification
- Add padding around main notification so it always aligns with the
  straight edges of the view (not the rounded corners); looks more
  dismissable
- Notification view collapses as notifications are dismissed
- To mimic system notification behavior, we copy SwipeHelper,
  FlingAnimationUtils, and Interpolators. We also apply elevation
  to notifications and reveal a darker color beneath when dismissing.

Bug: 32410600
Change-Id: I9fbf10e73bb4996f17ef061c856efb013967d972
2017-01-25 17:36:31 -08:00
Tony Wickham
010d255018 Add NotificationListener to launcher.
- NotificationListener extends NotificationListenerService, and is
  added to the manifest.
- Added PopupDataProvider, which contains logic for storing and
  interacting with data that goes into the long-press popup menu
  (shortcuts and notifications). A follow-up CL will rename
  DeepShortcutsContainer to a generic PopupContainerWithArrow.
- If Launcher has notification access, NotificationListener will
  get callbacks when notifications are posted and removed; upon
  receiving these callbacks, NotificationListener passes them to
  PopupDataProvider via a NotificationsChangedListener interface.
- Upon receiving the changed notifications, PopupDataProvider maps
  them to the corresponding package/user and tells launcher to
  update relevant icons on the workspace and all apps.

This is guarded by FeatureFlags.BADGE_ICONS.

Bug: 32410600
Change-Id: I59aeb31a7f92399c9c4b831ab551e51e13f44f5c
2017-01-25 09:51:06 -08:00
Tony Wickham
9a8d11f930 FastBitmapDrawable can draw an icon badge (notification count)
- Added BadgeInfo to contain data to be shown in a badge
  (currently just notification count).
- Added BadgeRenderer in DeviceProfile to contain things
  relevant to drawing the badge, such as size and Paint's.
- Added IconPalette to compute colors for the badge based
  on a dominant color (will also be used for notifications)
- FastBitmapDrawable uses these classes to draw the badge.

Bug: 32410600
Change-Id: I6595a4879943357590f7d20c22594691a573ecaf
2017-01-13 10:58:10 -08: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
1c581c6d61 Bug fix: QSB sometimes gets stuck to transparent.
At some places, we were calling removeAllListeners before calling cancel
 on an animation. AnimationListeners are also used to track states, and
 removing listeners before canceling will prevent onAnimationEnd to be
 called, thus preventing state cleanup.
 PinchAnimationManager was causing ZeroAlphaAnimatorListener to be removing
 from Qsb alpha animation, making the MultiStateAlphaController think there
 is a zeroAlpha animation running.

> Removing all instances of removeAllListeners
> Updating various affected listeners to handle onAnimatinoCancel
> Fixing WorkspaceStateTransitionAnimation, which was animation QSB alpha
  on page scroll index

Bug: 31910152
Change-Id: Ie7f31b67d4c502badcdd41f7b04867d1f35f5d27
2016-11-24 15:32:45 +05:30
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
Adam Cohen
119e8982ab First pass at new FolderIcon visual treatment
-> Modeled as a set of items around a circle
-> Modulate the radius and icon size as number of items grow
-> Clip the icons by a circular clip aligned to the background drawable

Remaining issues
-> Probably want to move to a programmaticly drawn circle + shadow
-> Anti-aliasing of the clipped region will need more attention
-> Need to animate all items in the preview as it changes (this
   wasn't required before)

Change-Id: I678ec605f6c8a34e9d7e4aec4e9583e36a9ef394
2016-02-17 10:41:46 -08:00
Winson
c08c59de07 Disabling the desaturation of fast scroll items.
Change-Id: I7e90e3b35dc6473ba5e2319abcea5c0c76cbd708
2015-10-28 15:30:38 -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
Hyunyoung Song
3f471440a8 WidgetTray revamp work
- RecyclerView is rendering
- Animation is connected
- Drag and drop is now handled
- UI tweaking: background, margins, more to come.
- Flicker and preview not loading issue:
  fixed height for the horizontal scroll view.
- Shortcuts are added
- Widget Preview loading should support shortPress for drop
- UI tweaks left: overlay of arrow when there are more items to scroll
- icons are added in the section header
- Sorting of widget sections and widget horizontal list
- Adding all the padding constants to dimen.xml file
- RecyclerView should only support one view type

For items to be addressed in follow up patches OR CLs,
TODO is added to the comment.

b/19897708

Change-Id: Ibfc4da1696a23d20bada93db46e126706eb13cdc
2015-04-08 19:01:34 -07:00
Sunny Goyal
c424f2290e Fixing Intrinsic dimensions of FastBitmapDrawable
> This was changed initially to allow overriding icon size in case
of PreloadIconDrawable. But the implementation of PreloadIconDrawable
has changed since then and this hack is no longer required.

issue: 15545872
Change-Id: I192056179837f05c5be9e24c3e1251cf7e2a7c8c
2014-09-05 07:07:09 -07:00
Sunny Goyal
508da15509 Updating the icon click feedback
> Using BubbleTextView everywhere, removed PagedIconView
> There is a brightness feedback on touch and shadow
feedback on click, until app launches

issue: 16878374
Change-Id: I3dc1149a123c8a75feca6210948398bf2187f1f2
2014-08-19 18:03:06 -07:00
Sunny Goyal
95abbb330c Updating the virtual preloader UX.
> No click feedback when in preloader mode
> No preloader UI when drawn in drag layer
> The preloader consists of a background 9 patch image and a circular progress
is drawn in the content region of the background.
> The preloader is drawn in a slightly larget area than the actual bounds to
make the circular progress more prominent compared to the icon.

issue: 15835307
Change-Id: Ifec3d93ecf1fac994d1128b517da3797247e7ed6
2014-08-11 12:32:04 -07:00
Sunny Goyal
c5c60ad359 Merging Motorola's patch to disable apps when is safe mode.
issue: 16044192

Change-Id: I10069dcdf459ecc71361271e883eabb743d77822
2014-07-18 16:10:34 -07:00
Winson Chung
268f1c563f Initialize FastBitmapDrawable bounds with default bitmap dimensions.
Change-Id: Ida9603e35b242a581b9401c6440875cd511725a1
2013-11-18 14:04:41 -08:00
Winson Chung
eeb5bbc940 Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic
grid scales icons down, due to the drawable bounds
not being equal to their bitmap sizes.

Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
2013-11-14 11:18:18 -08:00
Winson Chung
6e1c0d34bb Initial changes to support smaller landscape layouts.
Change-Id: If0abe2b82eb08bae4f1ce65b805362d548acb876
2013-10-28 18:30:25 -07:00
Daniel Sandler
325dc23624 Launcher2 is now Launcher3.
Changes include
  - moving from com.android.launcher{,2} to
    com.android.launcher3
  - removing wallpapers
  - new temporary icon

Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b
2013-06-05 23:30:20 -04:00