Commit Graph

13 Commits

Author SHA1 Message Date
Jon Miranda
4dd024b974 Add new motion for when Folder preview changes due to onDrop.
Instead of changing the display order of the Folder to preserve
the upper left quadrant, we are opting to change the Folder Icon
preview to always show the upper left quadrant.

This means that when adding items to a Folder, the preview items
may change. (They will change when the column size increases).

Bug: 27944225
Bug: 63140071
Change-Id: I863c2479469d68559cab2878030c2087d48217d6
2017-07-14 14:27:44 -07:00
Jon Miranda
cb73920b23 Move inner classes out of FolderIcon.
The goal is to eventually move all of the PreviewBackground and
Preview Item drawing out of the FolderIcon class.

Bug: 36022592

Change-Id: Ie0552bb4ca8a7e232c1c454a23558940e9394a14
2017-06-25 21:29:35 -07:00
Sunny Goyal
828b11e5a9 Setting the callback for previewItems to folderIcon. This allows the FolderIcon to get updated
without going through the child'draw pass.
Also simplifying the draw code for the FolderIcon to remove any cycling invalidate calls

Bug: 62900800
Change-Id: I17009a5347a1c3c35426313ac759e0240ce6a395
2017-06-22 10:25:43 -07:00
Mario Bertschler
c06af333cb Minor Refactoring only: no functional change
- organizing imports
- remove redundant modifiers on LauncherCallback interface
- fix typos

Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
2017-03-28 12:23:22 -07:00
Jon Miranda
5fcbad03ef Added getIconSize method to PreviewLayoutRule interface.
This will be used in new Folder animation.

Bug: 35064148
Change-Id: I5573336c0b8a9db8d1e600b1e16de07f48f35a21
2017-03-01 16:06:21 -08:00
Jon Miranda
655ec42ce5 Added FolderIconPreviewVerifier class.
This class verifies whether an item in a Foder is displayed in
the FolderIcon preview, based on the item's rank.

We use this class to determine which items in a Folder will be
displayed in the preview.

Bug: 35064148
Change-Id: Ia21bccbd95c348efeac62591ae3696a4c60b5339
2017-02-28 11:57:26 -08:00
Jon Miranda
12b616c7d4 Update PreviewLayoutRule API to prepare for new folder animation.
Also created a new FeatureFlag to start building behind.

Bug: 35064148
Change-Id: I4a7d30bf1e1f49f1012eb963695d44d67096a5bc
2017-02-06 17:31:58 -08:00
Adam Cohen
d3cc05a3a8 Account for disparity btw folder preview size and drawable size
-> When there is disparity between the cached icon size and the available space
   in the preview, the folder preview could appear not as intended (either
   overly crammed, or overly spacious)

issue 27701193

Change-Id: I9f97012ba569d1419b1e3f661cd26761b2a36285
2016-03-21 15:12:15 -07:00
Adam Cohen
efca0279eb 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
2016-03-03 09:24:45 -08:00
Adam Cohen
4f8071b759 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
2016-02-24 18:20:40 -08:00
Sunny Goyal
261194387b Revert "Reverting refactoring of Folder and FolderIcon to avoid dependencies breakage"
This reverts commit fc956e5a2a.

Change-Id: Ib3b5156b8fc3cad35c4634d61d5390c848ce1f93
2016-02-23 02:02:54 +00:00
Sunny Goyal
fc956e5a2a Reverting refactoring of Folder and FolderIcon to avoid dependencies breakage
Change-Id: Ifd0d717d70aff4c83c9eb5cba397d04500b2c869
2016-02-17 13:27:13 -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