summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/FastBitmapDrawable.java
Commit message (Collapse)AuthorAgeFilesLines
* Update notification visuals (part 2)Tony Wickham2017-03-021-1/+1
| | | | | | | | | | | | | | - 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
* Removing custom state definition from FastBitmapDrawableSunny Goyal2017-02-231-127/+53
| | | | | | | > For Fast scrolling, using state list animator defined in xml > For Pressed state, using onState change method in a drawable Change-Id: Ia608690f593938cf0f77e00afcc2a3076e48d8f4
* Animate badges when they are added or removedTony Wickham2017-02-071-5/+28
| | | | | | | | | | | - Scale the badge and text or icon up or down, respectively. - Only animate if the badge is visible, and don't animate when applying shortcut or app info. - Animate folder badge out when folder enters accepting state. Bug: 34838365 Bug: 32410600 Change-Id: Ie60cb1fc54fe60d72734d833040545d27660d645
* Updating the PreloadIconDrawableSunny Goyal2017-02-061-1/+1
| | | | | | | | | > 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
* Add swipe-to-dismiss notifications in popup menu.Tony Wickham2017-01-251-4/+9
| | | | | | | | | | | | | | - 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
* Add NotificationListener to launcher.Tony Wickham2017-01-251-7/+12
| | | | | | | | | | | | | | | | | | | | | - 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
* FastBitmapDrawable can draw an icon badge (notification count)Tony Wickham2017-01-131-0/+30
| | | | | | | | | | | | | - 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
* Adding an overridable DrawableFactory to allow creating custom icon drawablesSunny Goyal2016-12-071-4/+15
| | | | | | > Adding ItemInfo as a parameter for creating drawable Change-Id: I793acb0381d2b8df4db0a08317dddf1464788ebc
* Bug fix: QSB sometimes gets stuck to transparent.Sunny Goyal2016-11-241-1/+0
| | | | | | | | | | | | | | | | | | 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
* Keep disabled FastBitmapDrawables disabled while fast scrolling.Tony Wickham2016-11-111-8/+22
| | | | | | | | | | | | 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
* First pass at new FolderIcon visual treatmentAdam Cohen2016-02-171-1/+1
| | | | | | | | | | | | | | -> 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
* Disabling the desaturation of fast scroll items.Winson2015-10-281-2/+2
| | | | Change-Id: I7e90e3b35dc6473ba5e2319abcea5c0c76cbd708
* Highlighting sectioned apps on fast-scroll.Winson2015-09-281-87/+214
| | | | | | | | | | | | | | - 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
* WidgetTray revamp workHyunyoung Song2015-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | - 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
* Fixing Intrinsic dimensions of FastBitmapDrawableSunny Goyal2014-09-051-2/+2
| | | | | | | | | > 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
* Updating the icon click feedbackSunny Goyal2014-08-191-7/+58
| | | | | | | | | > 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
* Updating the virtual preloader UX.Sunny Goyal2014-08-111-29/+59
| | | | | | | | | | | | > 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
* Merging Motorola's patch to disable apps when is safe mode.Sunny Goyal2014-07-181-2/+59
| | | | | | issue: 16044192 Change-Id: I10069dcdf459ecc71361271e883eabb743d77822
* Initialize FastBitmapDrawable bounds with default bitmap dimensions.Winson Chung2013-11-181-0/+1
| | | | Change-Id: Ida9603e35b242a581b9401c6440875cd511725a1
* Use the icon bounds for all calculations.Winson Chung2013-11-141-23/+5
| | | | | | | | - 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
* Initial changes to support smaller landscape layouts.Winson Chung2013-10-281-0/+1
| | | | Change-Id: If0abe2b82eb08bae4f1ce65b805362d548acb876
* Launcher2 is now Launcher3.Daniel Sandler2013-06-051-0/+109
Changes include - moving from com.android.launcher{,2} to com.android.launcher3 - removing wallpapers - new temporary icon Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b