Commit Graph

18 Commits

Author SHA1 Message Date
Sunny Goyal
00ac920241 Simplifying app icon popup
> Using a single linearLayout instead of multiple nested views
> Using clipToOutline for rounded corners instead of using canvas.saveLayer
> Removing nested view elevations and overdraw
> Using LayoutTransition for animating layout changes, instead of manually creating animators

Change-Id: I8e57092f52ca5a032a2756594fdd39788acc5a0d
2017-11-15 16:43:20 -08:00
Sunny Goyal
10a1bd0e65 Converting PopupContainerWithArrow into a base class so that it is easier
to create other types of popup

Bug: 67585158
Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
2017-10-10 10:28:05 -07:00
Tony Wickham
2063ebd990 Adjust notification paddings
- Reduce main notification height
- Increase header height and center "Notifications"
- Footer has short height when empty to serve as padding

Bug: 65215656
Change-Id: I691d176628b0b51e8d9af030084b8c29837778dc
2017-09-06 13:37:00 -07:00
Tony
67a25b3c4d Keep gutter aligned when removing notification footer
Bug: 63262764
Change-Id: I94e7978dafc04fc2673a9bb8c6d24ff20641416f
2017-07-06 08:28:33 -07:00
Tony Wickham
79b176e42c Fix visibility of notification footer divider
Now it is only visible when the notification footer is present,
instead of always being visible.

Change-Id: Ie85ff31918901115cdfe55b36e75aa80b43e7b13
2017-06-05 17:54:45 -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
81ebe383f5 Small cleanup for notifications
- Add null check when collapsing footer, as container could be null
  if the app is opened
- Remove redundant method that always passed mNotificationItemView
- Set mNotificationItemView to null when it is removed

Change-Id: Ia329815224b213fc688733eaaf6f29ee6888caaf
2017-03-15 14:46:02 -07:00
Tony Wickham
9407d4ab57 Update notification visuals (part 2)
- Background is now white, and color beneath and divider color
  updated accordingly (not from color extraction)
- Removed overflow text ("+6") and added it to a header
  ("6 Notifications"). Use "..." instead if there is an overflow.
- Even spaced out icons in notification footer between the
  far right icon and the ellipsis
- Remove code to change arrow tint, since it is always white
  now. This also fixes the issue where it was drawn as a rect.

Bug: 35766387
Change-Id: I03bfda4ff029f23dd8b3dd1b72f534ea0e2c0816
2017-03-02 11:27:16 -08:00
Tony Wickham
7f3526a1a4 Update notification view to match newer specs
- Use smaller radius for notifications round rect background
- Remove "Notifications" header, and clip children to round rect path
- Flip main notification so that icon shows on the right instead of
  left; footer is also flipped so animation makes sense
- Clean up animations to animate view outline instead of height

Bug: 32410600
Change-Id: I6bd1e1f8395b3703f28c3b0056a89e67672368ab
2017-02-24 12:09:06 -08:00
Tony Wickham
6d66c1cfeb Remove first icon from notification footer after it animates.
Before, we had a hack where the notifation view would tell the
footer to trim its notifications, which is inefficient and ugly
since we already know exactly what notification to remove. So
now we move the relevant removal logic (keeping things like the
overflow text in sync) to a removeViewFromIconRow() that is
used after the icon animates as well as when trimming notifications.

Bug: 32410600
Change-Id: I19e54e0c28daea869b45649c7f5c74843412bb86
2017-02-22 15:33:35 -08:00
Sunny Goyal
9e76f682f3 Removing wrapper around ViewPropertyAnimator, and using ObjectAnimator
instead

Bug: 35218222
Change-Id: Ic714cf7d20989cb45f07712e8a6f6659d0e3f30d
2017-02-16 11:19:01 -08:00
Tony Wickham
bdbfd5bb3a Merge "Use notification icon views' tags to store NotificationInfo." into ub-launcher3-master 2017-01-31 22:38:37 +00:00
Tony Wickham
1f0b5347b8 Use notification icon views' tags to store NotificationInfo.
Previously we had a mapping from View to NotificationInfo,
but this way we don't have to maintain that separate mapping
and can follow the pattern used throughout the rest of launcher.

Change-Id: Ia988f822613b9978bab3d0127226de920a3e73c9
2017-01-27 14:28:42 -08:00
Tony Wickham
f79877c04c Ensure notification icons have enough contrast with background.
This uses the same color calculations as the system, except that
we use the extracted notification background instead of assuming
it is white.

Bug: 32410600
Change-Id: I7be8b9459ca38d01a6780758898541e69ec42576
2017-01-27 12:43:31 -08:00
Tony Wickham
9f1612cddd Merge "Store notification keys in a List instead of a Set." into ub-launcher3-master 2017-01-26 23:38:02 +00:00
Tony Wickham
2efcdd0c78 Store notification keys in a List instead of a Set.
This will preserve the order when iterating over the notifications to
populate the popup container.

Bug: 34735689
Change-Id: Ic390ffef140e454566ffc6ab1763950349df25ce
2017-01-26 11:28:43 -08:00
Tony Wickham
30e45187a8 Add and update some comments badging/notifications.
Change-Id: Iab4e837c9be01cbd7764c8920e36c6d8159e16dd
2017-01-26 09:24:41 -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