summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/popup/PopupContainerWithArrow.java
Commit message (Collapse)AuthorAgeFilesLines
* Adjust notification paddingsTony Wickham2017-09-061-2/+3
| | | | | | | | | - 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
* separate enforceContainerWithinScreen logic to a private methodHyunyoung Song2017-07-201-2/+7
| | | | Change-Id: Ifcf8c6a79286269646a845b5be6cfa92b64fcbcc
* PopupContainerWithArrow should align correctly in RTL modeHyunyoung Song2017-07-191-15/+20
| | | | | | | | | | | Test: see attached screenshot in the bug Bug: 63721807 the horizontal gravity enforcement has to be done on (left+translateX) value and not just translateX. Hence that enforcement has been moved to onLayout. Change-Id: I9b6502dc55d59e04a406ebe71ac3b649b31d6088
* Polish popupTony2017-07-051-8/+12
| | | | | | | | | - Remove divider between system shortcut header and shortcuts - Slightly reduce padding between popup and icon - Fix gravity to center in drag layer using x and y calculations since we use the y value to position the popup when removing notifications Change-Id: I1cb10ed953d11cc0924d8ee70881a434cb748317
* Tweak popup animationTony2017-06-291-9/+19
| | | | | | | | | | | | | | - Decrease duration - Add alpha fade in and out - Remove arrow scale when closing, so that the reversal happens immediately These changes help the popup feel snappier while also reducing visual jank when moving icons (as the animation accelerates in later and the alpha stays close to 0). Bug: 62738635 Change-Id: Ic8af4e0e5bc00913ea713853997069e8b9c8f953
* Don't fade in text if icon is in hotseatTony2017-06-281-4/+1
| | | | | Bug: 63011217 Change-Id: Ie914fcdfd0bf36b0cf12cc54f4e93206aa1074bd
* Popup visual changesTony Wickham2017-06-271-4/+14
| | | | | | | | | | | - Don't remove elevation during animation (b/62905720) - Other adjustments (b/35766387) - Add "gutter" between notification and shortcuts - Change shortcuts to always be primary color (e.g. white) - Scale down shortcut icons when notifications present - Apply icon extracted color to "Notifications" header Change-Id: Idf791dc76d15d05d246000ad73810916d7cd1750
* PopupContainerWithArrow accepting bubbletextview without icon being set.Mario Bertschler2017-06-221-1/+3
| | | | Change-Id: I5f58c339c094b4a88adf27c2ecaa01ba052b2285
* Adjust some sizes in popupTony Wickham2017-06-191-0/+6
| | | | | | | | | - Increase main notification height and pad text/icon bottom - Reduce shortcuts height when there are notifications to 48dp - When the last notification is dismissed, animate back to 56dp Bug: 35766387 Change-Id: I84f843c042137fdf93fa720802eb2f19337197b4
* Merge "Show more shortcuts when last notification is dimissed" into ↵Tony Wickham2017-06-201-17/+49
|\ | | | | | | ub-launcher3-dorval-polish
| * Show more shortcuts when last notification is dimissedTony2017-06-151-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently only show 2 shortcuts when notifications are present, but support up to 4 otherwise. With this change, the hidden shortcuts are added back after dismissing the notifications, instead of only after closing and reopening the container. To ensure the transition is as elegant as possible, we also separated the shortcuts header from the rest of the shortcuts. That way we can reveal the new shortcuts without removing the header (the shortcuts come out from behind the header). Bug: 38036250 Change-Id: Ie9ab35f9be57cec1d5345e9e70e84e09ea52c9fc
* | Fade original icon's text in as popup closesTony2017-06-161-0/+3
|/ | | | | Bug: 62444131 Change-Id: If8f91d8455a5952d252f9cdd1b211afb5ee035c7
* resolve merge conflicts of 7092db024 to ub-launcher3-dorval-polishTony Wickham2017-06-081-4/+1
|\ | | | | | | | | Test: I solemnly swear I tested this conflict resolution.x Change-Id: I0f9ed3d42fcb04299c3c23d06629f855614c0538
| * Add support for color extracted notification dotsTony Wickham2017-06-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Add support for popup dark themeTony Wickham2017-06-061-9/+6
| | | | | | | | | | Bug: 62380473 Change-Id: Ib22e9b82841bf10b7f139638f268f0a878e3c6b9
* | Fix visibility of notification footer dividerTony Wickham2017-06-051-0/+3
| | | | | | | | | | | | | | Now it is only visible when the notification footer is present, instead of always being visible. Change-Id: Ie85ff31918901115cdfe55b36e75aa80b43e7b13
* | Remove gap between popup itemsTony2017-05-311-120/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | - Unround interior corners - Update colors (shortcuts are gray when next to notifications, notifications always white) - Clean up animation to animate entire popup with simple reveal instead of individual items animating with reveal and icon scale Bug: 35766387 Bug: 36110804 Change-Id: I33685d53e2db3904731676123dc230be4dabb5d4
* | Don't hide text in pre-drag when opening popup above iconTony2017-05-241-3/+16
|/ | | | | Bug: 38468930 Change-Id: Id03162af829a00442d1db0a93f7e9d8bcb998b1a
* Update accessibility for popupTony2017-05-111-9/+18
| | | | | | | | | | | - 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
* Visual updates for popupTony2017-05-091-4/+8
| | | | | | | | | | | | | | | - Update some dimens - Increase left padding for shortcuts - Adjust arrow and notification ellipsis offset accordingly - Align shortcut dividers to be same width as text - Notification text 14sp instead of 15sp - Increase width of popup by 12dp - Shortcuts text 87% black instead of 54% - Arrow has same color as attached side, so takes on header gray instead of white when appropriate Bug: 37753827 Change-Id: I0844b85995f22218a3b7e605e1653cceaed6cda1
* Handle back-to-back height reduction animationsTony Wickham2017-04-271-14/+19
| | | | | | | | | | | | | We reduce the height of the notification item when the second to last notification is dismissed (to remove the unused footer) and when the last notification is removed (to remove the unused notification item). If the former is runninng when the latter starts, the end result is janky because we weren't properly cleaning up the first animation when the second began. We now cancel the existing animation before starting the second. Bug: 36172954 Change-Id: I742c15b6f59874bc675b4c20a83e9578ac5e5387
* Re-enable badges, with all dotsTony Wickham2017-04-271-5/+0
| | | | | | | | | Also updated folder badge (dot) color to light gray, added notification header back (with same number as before, where each notification counts as >= 1), and increased shadow opacity for the dots. Change-Id: I53a3e0d94f23f482b55b3c10a922939ebb381314
* Support notifications with 0 count (show as dots)Tony Wickham2017-04-261-1/+6
| | | | | | | | | | | | - Show number if number > 0 - Show icon if number == 0 and a notification specified an icon to show - Show a dot otherwise - In cases of multiple notifications, stack a second badge behind the first (visuals will be updated in future CL, as well as support stacked dots) - Folders always show dot if any app within has a badge. Change-Id: I0a89059b0e0a0d174fe739c9da4f75fa18c0edfa
* Move update popup header out of BubbleTextViewTony Wickham2017-04-261-14/+15
| | | | | | | | Now we update from Launcher, which is both more efficient (only run it when badges update, not whenever BubbleTextView applies an ItemInfo) and more logical/cleaner. Change-Id: Ib77433d9489c29e9781b3a48de37de0e07b5ba07
* Merge "Update icon badges to match spec" into ub-launcher3-dorvalTreeHugger Robot2017-04-251-1/+3
|\
| * Update icon badges to match specTony Wickham2017-04-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | - Size defined as percentage of app icon size - Width changes when there are 2 or 3 digits (round rect) - Offset slightly away from the app icon - Had to move drawing to BubbleTextView instead of FastBitmapDrawable - Hide badge when dragging and while popup is open - Tweaks for some color/text parameters Bug: 35744066 Change-Id: Ibb15ca634abaa0729aea637c904c4c6889a58c7c
* | Only add widgets system shortcut if widgets existTony Wickham2017-04-201-12/+12
|/ | | | | | | | | | | | Before we were adding it in a disabled state, and then enabling it once widgets were bound (if widgets existed for that app). Now we load all widgets when launcher starts so that we can use the values for the purpose of animating the popup container. Then, as the container opens, we reload widgets/shortcuts for that particular app and add/remove the widgets shortcut if necessary. Bug: 34940468 Change-Id: I64bd009442d10d3d1f9a977bdedfdb639a7dd193
* Merge "Slightly round corners of popup arrow" into ub-launcher3-dorvalTony Wickham2017-04-171-1/+7
|\
| * Slightly round corners of popup arrowTony2017-04-171-1/+7
| | | | | | | | | | Bug: 35766387 Change-Id: I8d2be54c977074dbcf0d5884f44347edd0217bb5
* | Ensure system shortcut icons always appear in correct orderTony Wickham2017-04-131-1/+1
|/ | | | | | | | | | - Remove "|| true" that I accidentally left in from testing on a different CL - Always reverse system shortcut icons that appear in the header of the ShortcutsItemView, so they are in priority order from right to left Bug: 35766387 Change-Id: Ia7ac5a72eb2f6d3795e35bd044c426ef46fc0ccc
* Update popup to match redlinesTony Wickham2017-04-111-12/+17
| | | | | | | | | | | - Update specs in dimens.xml and colors.xml - Move notification count to top right, and keep "Notifications" in left - Also removed NotificationHeaderView and instead use FrameLayout - Limit to 2 shortcuts instead of 3 if there are notifications - Use SP instead of DP for text (b/35869307) Bug: 35766387 Change-Id: I892640933ad6351946af3df6c805b98bb4e7cb50
* Add support for system shortcuts in popup containerTony Wickham2017-03-301-18/+37
| | | | | | | | | | | | - Currently the system shortcuts are just widgets and app info - As shortcuts, they live in ShortcutsItemView - They are populated either as icons only (if there are deep shortcuts) or as icons + text - Widgets are disabled until binding them is complete (we request for them to be bound on long-press now). We should revisit this. Bug: 34940468 Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
* Add WidgetsAndMore bottom sheetTony Wickham2017-03-301-9/+0
| | | | | | | | | | | - Contains two rows, one for widgets, and one for "configurable shortcuts" that have customization activities - Extends AbstractFloatingView and uses VerticalPullDetector for touch interactions - No way to show this currently; will add options to popup in followup Bug: 34940468 Change-Id: Iab62c2cb89428f91119c9c86f9db886496c321fd
* De-dupe shortcuts with the same id as the main notification.Tony Wickham2017-03-241-6/+8
| | | | | | | | | | | - Pass NotificationKeyData, which includes the shortcut id, instead of just the notification key from NotificationListener - Remove the shortcut with the same shortcut id as the first notification, if it has one, in PopupPopulator#sortAndFilterShorcuts() - Add some unit tests Bug: 36571718 Change-Id: I308941b34c525b34686583476e3f82ccb8b7e2d8
* Small cleanup for notificationsTony Wickham2017-03-151-9/+6
| | | | | | | | | - 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
* Update notification visuals (part 2)Tony Wickham2017-03-021-9/+23
| | | | | | | | | | | | | | - 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
* Add null check when populating popupTony2017-03-011-8/+8
| | | | | | | It was crashing when there were notifications but no shortcuts. Change-Id: I92e961e6186ef24736777855e114bd3245f7ac91
* Merge deep shortcuts in rounded rectTony Wickham2017-03-011-116/+59
| | | | | | | | | | | | | | | | | - DeepShortcutViews are added to ShortcutsItemView, which is in PopupContainerWithArrow - Moved some shortcut-specific logic to ShortcutsItemView (namely, touch/long-click handling for draggin shortcuts) - Moved round-rect clipping to PopupItemView - Removed collapseToIcon() logic, including PillWidthRevealOutlineProvider, which was only used for that purpose. It isn't necessary now that the deep shortcuts have no background themselves. - Replaced focus pill drawable with ripple effect on shortcuts and notification view. Bug: 35766387 Change-Id: I6bc09f1851cfbb806df4bf75a6e435b0f1900c9c
* Update notification view to match newer specsTony Wickham2017-02-241-18/+43
| | | | | | | | | | | - 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
* Removing wrapper around ViewPropertyAnimator, and using ObjectAnimatorSunny Goyal2017-02-161-20/+22
| | | | | | | instead Bug: 35218222 Change-Id: Ic714cf7d20989cb45f07712e8a6f6659d0e3f30d
* Add basic logs for tap outside action.Jon Miranda2017-02-071-0/+5
| | | | Change-Id: I6288610b9870c3abe88794c53309b1d76dd2780f
* Add logging for notifications.Tony Wickham2017-02-071-1/+1
| | | | | | | | | | | | | - Log notification launches - Log notification swipes - Fix logDragNDrop() to only log if the pre-drag ends (so it doesn't log a long-press that only shows shortcuts without dragging). - Add shortcut rank to logs when launching deep shortcuts, where 0 is the shortcut closest to the app icon (highest rank). Bug: 34770729 Bug: 32410600 Change-Id: I99dcef9b6a71da2ef58e32397702bb137407b10f
* Merge "Handing pin item drag when workspce is not loaded" into ↵Sunny Goyal2017-01-271-2/+2
|\ | | | | | | ub-launcher3-master
| * Handing pin item drag when workspce is not loadedSunny Goyal2017-01-251-2/+2
| | | | | | | | | | | | | | | | While the launcher is loading, the drag view is displayed with a gray tint. The drag is started, as soon as the workspace is unlocked Bug: 33584624 Change-Id: I4013ea8b987ec305e73742b194f9e96af761cc35
* | Add swipe-to-dismiss notifications in popup menu.Tony Wickham2017-01-251-12/+108
|/ | | | | | | | | | | | | | - 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
* Refactor DeepShortcutsContainer to PopupContainerWithArrowTony Wickham2017-01-251-0/+732
- Also added PopupItemView, which takes animation logic from DeepShortcutView, and which DeepShortcutView now extends. - Renamed ShortcutFilter to PopupPopulator, which has support for new item types (not yet used). Also moved populating logic (e.g. UpdateShortcutChild Runnable) to PopupPopulator. Bug: 32410600 Change-Id: Ib6e444ac7ca99c80ba438801c26e62d9542e0ad9