History log of /packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7092db02410562026da17a7b38f48025cc847de2 07-Jun-2017 Tony Wickham <twickham@google.com> 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
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
e6a790e5ae98ecfd754638a9ff5e87ee45aad069 16-May-2017 Tony Wickham <twickham@google.com> Use a single color for all icon badges.

Bug: 38346375
Change-Id: I26b7ad3dcfea6a18e169d656e19605c9794eadd3
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
0530e8c60809afa92b1aa907376f0553ad94d58f 27-Apr-2017 Tony Wickham <twickham@google.com> Support notifications with 0 count (show as dots)

- 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
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
1237df0a7cb89570b90b30fa30a3c76417ce3b64 24-Feb-2017 Tony Wickham <twickham@google.com> Update icon badges to match spec

- 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
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
19b93b7988c12a25d9a88ca808d871916263ef9f 20-Feb-2017 Sunny Goyal <sunnygoyal@google.com> Updating FolderIcon drawing to avoid dependency on software layer.

Instead of cliping using clipPath, using PorterDuffXfermode to clear
area outside the bounds. This provides much better support for antialiasing.
Software layer was also being used for drawing shadow. But since the paint
color was set to transparent, no shadow was being drawn in O. Instead drawing
the shadow using radial gradient.

Bug: 35680116
Bug: 35428783
Change-Id: I0431664400628d5d01675fe72fe7ade01b64d611
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
608d0dba8717326319800a78cfa85f3ad08b9549 28-Feb-2017 Jon Miranda <jonmiranda@google.com> Close Folder before doing any automatic updates.

We already close the Folder when Work Profile apps are
auto added to the Work Profile Folder. This change extends that
functionality to when apps are being auto removed from the
Work Profile Folder.

Bug: 35845161
Change-Id: I2aa6a6a0ed28a95f6a59a549430f91482583548b
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
440609453f14fa8ce4bec1d70032f0b7f9614d4e 22-Feb-2017 Jon Miranda <jonmiranda@google.com> Close Folder when an item is auto added to it.

This can happen when items (as part of a Work Profile) are auto added
to the Work profile Folder.

Bug: 35628160
Change-Id: I29d3b277b0e9cd4bb238fb5aff9a52c6b9e764f8
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
4b20e0c312d7a6f5f0a65e8bada74eeb52c15bc0 07-Feb-2017 Tony Wickham <twickham@google.com> Merge "Animate badges when they are added or removed" into ub-launcher3-master
1e61849bc729858f3fd0c0a1f31b15ef06cffdc3 02-Feb-2017 Tony Wickham <twickham@google.com> Animate badges when they are added or removed

- 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
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
72d90876b8d0403684a534fa65cfbe91c839019b 07-Feb-2017 Jonathan Miranda <jonmiranda@google.com> Merge "Update PreviewLayoutRule API to prepare for new folder animation." into ub-launcher3-master
11ba507eab83f591b924ae42d42fa47073b78917 02-Feb-2017 Tony Wickham <twickham@google.com> Add badges to folders

- The folder badge contains the sum of the badge counts within.
- This is represented by FolderBadgeInfo, a subclass of BadgeInfo.

Bug: 34828806
Bug: 32410600
Change-Id: I977a69cc7baf80a7207af9adf98dddb0a3509c47
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
12b616c7d446d3274d16938d8bc37f5dc4bdc211 07-Feb-2017 Jon Miranda <jonmiranda@google.com> Update PreviewLayoutRule API to prepare for new folder animation.

Also created a new FeatureFlag to start building behind.

Bug: 35064148
Change-Id: I4a7d30bf1e1f49f1012eb963695d44d67096a5bc
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
db7b82960a54b85510aaeba2f543b37b4dc59fc8 07-Feb-2017 Sunny Goyal <sunnygoyal@google.com> Merge "Updating the PreloadIconDrawable" into ub-launcher3-master
cda3bfb2e1d89ad872558dd0a82ae79ca6fe41ea 07-Feb-2017 Jon Miranda <jonmiranda@google.com> Remove unused View parameter from ofFloat method.

Change-Id: I5fabd5c78de52ba68b67e0b1bd7208f4d1f7cbea
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
96ac68a481ce5b794b5227e09ace7c30d6dd5e7b 03-Feb-2017 Sunny Goyal <sunnygoyal@google.com> 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
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
1cd01b023acc123b771765b7297d8aaedac224e0 09-Nov-2016 Sunny Goyal <sunnygoyal@google.com> Ensuring that ShortcutInfo always has an icon

> Making iconBitmap public instead of a getter (similar to AppInfo)
> Removing getIcon() which can lead to IO on UI thread
> Removing updateIcon and handling the update at the caller

Bug: 21325319
Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
55cb70bf70d6defe84fe44e0d942998adefbb71c 12-Nov-2016 Sunny Goyal <sunnygoyal@google.com> Adding an overridable DrawableFactory to allow creating custom icon drawables

> Adding ItemInfo as a parameter for creating drawable

Change-Id: I793acb0381d2b8df4db0a08317dddf1464788ebc
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
740ac7f00e0b847b8e392800f7948d93493e11d6 29-Sep-2016 Sunny Goyal <sunnygoyal@google.com> Refactoring floating view opening/closing logic

> Creating a base view for floating panels with some common methods
> Moving the getOpen method to individual classes
> Moving the folder icon animation logic to folder icon
> Moving all the logic related for opening folder to Folder class

Change-Id: I898dfb6870b857cb921d2729b89618bc43ff2e88
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
e393d3af369c452f3b5f5d9c0a23a83aa3aa736b 09-Sep-2016 Sunny Goyal <sunnygoyal@google.com> Using DragObject for folder drop instead of maintaining states when
drag starts from inside a folder

Change-Id: I073b59c194d0bd483d579bbcb638b116b09590a0
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
8f288aac99a11d52fd9747f360a8ce3bb521b17a 26-Jul-2016 Winson <winsonc@google.com> Ensure that we update the preview layout rule when not animating.

Bug: 28166173
Change-Id: Ibf0245f2dd667216ccabb23a1b279b1801d60cac
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
bfbf7f9f4a0b300613f0ff27a4eb592d88c08325 19-May-2016 Tony Wickham <twickham@google.com> Add support for launcher shortcuts.

- This CL has no UI but provides the necessary backing for one.
- Adds new item type: ITEM_TYPE_DEEP_SHORTCUT, to distinguish from
ITEM_TYPE_SHORTCUT. We can reconsider these names.
- Adds ShortcutCache, using LruCache for up to 30 dynamic shortcuts
(pinned shortcuts are always cached in a HashMap).
- DeepShortcutManager queries for shortcuts and other things like
pin them. In a future CL it will use the cache, but for now it
simply makes an RPC for all queries.
- LauncherModel maintains counts for pinned shortcuts, pinning and
unpinning when counts reach 1 or 0, respectively.
- LauncherModel maintains a map of components to lists of shortcut ids,
which Launcher gets a copy of after it is changed in the background.
This will allow us to know how many shortcuts an app has immediately,
and query for details as the UI is animating.

Change-Id: Ic526f374dd10d72a261bae67f07f098fca8d8bca
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
ae50284e0a838139c67caf0064a0977c871497fa 17-Jun-2016 Sunny Goyal <sunnygoyal@google.com> Moving LauncherAccessibilityDelegate to Launcher to associate it with
activity lifecycle.

Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
aaf7d1d13bd88bdeac5c56a9ab1d293fdaea3c11 17-May-2016 Sunny Goyal <sunnygoyal@google.com> instead of unbinding items from the loader, unregistering listeners
in activity.onDestroy()

Bug: 28740269
Change-Id: I6bf2ad6aca43970fd10cfbcc113e609c227e07bf
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
90cb3e51af988d526912aed7a532745d729a844c 17-May-2016 Sunny Goyal <sunnygoyal@google.com> Revert "Wrapping folderLisners with weak reference, and storing it as an array"

This reverts commit e48644a6cc3024399ee2c9509d42ef6c2770ef61.

Change-Id: I7bd1d09cae42193de228cb58c08526eeaf57ec04
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
e48644a6cc3024399ee2c9509d42ef6c2770ef61 17-May-2016 Sunny Goyal <sunnygoyal@google.com> Wrapping folderLisners with weak reference, and storing it as an array

Storing as an array allows the listeners to be overriten on next bind.
These changes remove the need to unbind the item

Bug: 28740269
Change-Id: Ibbe4b760d64784fbe3075d18e2b946b366d631c5
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
37b2a496ebd6a985c210abaa6ca745a860f5f9d2 07-Apr-2016 Adam Cohen <adamcohen@google.com> Remove special code path for not animating folder open in power save mode

-> framework takes care of this
-> stripped unused code

Change-Id: If1941447df5c3145db715971440b80bd754f0bb1
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
c52ba710053e4c6927937dd1a26d1abe06b6fa99 06-Apr-2016 Sunny Goyal <sunnygoyal@google.com> Fixing folder icon not getting redrawn when the contents change

> Removing parent from ItemOperator as inconsistant values were
being passed in workspace and folderPagedView
> Fixing itemChanged causing multiple redraws, by passing a
'animate' parameter to explicitely request animation

Bug:27740161
Bug:28015426

Change-Id: Ide7b266bde9aad5f450a3f808a59182fe01a5110
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
f172b747c24f28e29baaaf58f08bab48847b7a40 31-Mar-2016 Adam Cohen <adamcohen@google.com> Fix a couple polish bugs with new folder previews

-> Don't reuse the same background object for the folder create preview
since this can cause interruptions in the animations for previous
creation previews.
-> When drawing the background to preview creation, don't draw the stroke
above the icon since the icon is not yet contained by the folder.

Change-Id: Ib666dc2453df465b342c02f3bd109b553a769dcc
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
aa2542a461072a57058ce45946ff6f5552ecce8a 21-Mar-2016 Adam Cohen <adamcohen@google.com> Invalidate folder drawing paramaters when top padding changes

-> This fixes issues when moving folders between the workspace
and hotseat (which have different top paddings)

Change-Id: Iac5a4575a403ce8eadd1d3195f02ab10fe5dac23
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
efca0279eb927faebffc38c8382818df67fcd159 25-Feb-2016 Adam Cohen <adamcohen@google.com> Switch all folder preview rendering to be programmatic (ie. no assets)

-> Refactored the preview background rendering to be much more self-contained.
This cleans up a lot of code in the CellLayout, and keeps the logic in the
right place.
-> We switch to software rendering for performance and compatibility reasons.
-> Removed all assets.
-> FolderIcon accept animation includes animation of the clipped region.
-> 1:1 hand-off of drawing of the FolderIcon background between the FolderIcon
and the CellLayout. Unfortunately, CellLayout rendering is still required
to work around clipping issues (due to use of software layer). We also
need this to support folder creation feedback.

Change-Id: Ib8f7fa6359dfedff8145f38dd50ba03849ca0d51
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
4f8071b759fd54bc6d271ea450af00fe0730baea 14-Feb-2016 Adam Cohen <adamcohen@google.com> Cleaning up folder icon drawing

-> Tracking individual drawing parms for each item
-> This enables animation of the preview items as the preview changes

Change-Id: I1b8f650cb28dc09cfb921bbdc93f2a3db61178fd
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
261194387beebaa7927ec4e310274218b651494d 18-Feb-2016 Sunny Goyal <sunnygoyal@google.com> Revert "Reverting refactoring of Folder and FolderIcon to avoid dependencies breakage"

This reverts commit fc956e5a2a818c06ed3424e15b0aa20a3f604658.

Change-Id: Ib3b5156b8fc3cad35c4634d61d5390c848ce1f93
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
fc956e5a2a818c06ed3424e15b0aa20a3f604658 17-Feb-2016 Sunny Goyal <sunnygoyal@google.com> Reverting refactoring of Folder and FolderIcon to avoid dependencies breakage

Change-Id: Ifd0d717d70aff4c83c9eb5cba397d04500b2c869
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
119e8982ab6a0cf00e31e8744f27b72ba8bf7b20 05-Feb-2016 Adam Cohen <adamcohen@google.com> 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
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java
f9c184a619e4e4b82cf9e0bf318ca6d8deaaaee7 16-Jan-2016 Adam Cohen <adamcohen@google.com> Refactor FolderIcon to separate the preview effect into it's own class

-> Created com.android.launcher3.folder package to house most folder-related files
(aside from the FolderInfo) which is more related to the model than the UI.

Change-Id: I767063e1e4c775c01a799a3bede30cd94ac48ade
/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderIcon.java