The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.
Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
- Fix bug where folders are misaligned.
- Fix bug when closing on 2nd page of large folder.
Bug: 184822585
Test: drag folder originally in hotseat to workspace, vice versa
test on grid where isScalable=true and isScalable=false
Change-Id: I08a79b8d280df3e3974baaa07e80db6bc4165e58
- Remove fade since we no longer clip icons.
- Ensures a clean handoff between drag view and folder icon preview item.
Bug: 175329686
Test: create folder / add items to folder
Change-Id: Iaab592410734b0b5239dbbddbb9b2ed5a9f5d8b0
- Also fixes open/close animation when items were not getting clipped
due to folder not being measured yet.
Bug: 190210234
Bug: 190164147
Test: manual
Change-Id: I230c33d7e4e1871d8d702737c56c79ce46504b8f
Merged-In: I230c33d7e4e1871d8d702737c56c79ce46504b8f
- Switch Circle to PathShape as it allows for more flexibility on
choosing what gets cropped.
- Remove shadows, and stroke.
Bug: 188095988
Test: manual
Change-Id: I602b3efcd35c2c11dc3461f49099c2f2a56eae59
- Starts listening to local wallpaper colors as soon as folder
is positioned.
- The folder open animation already has a background color
animator.
- For simplicity, folder open animation always starts
first, and then we cancel its background color animator,
and start a new animator to the extracted color.
- setAutoCancel would be handy here, but it does not work, will
track in a separate bug.
- Since folders are reused, we clear our the color extractor on
folder close.
Bug: 175329686
Test: multiple folders on rainbow background
open each folder, ensure bg animates to proper color
Change-Id: Ie0f2c0632fa2361f7710ba247d74f882620dec16
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs
When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.
This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.
I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.
Bug: 175329686
Test: - switching between device profiles,
- testing folder open/close
- testing in multiwindow
- testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
These are the more generic versions of Launcher and DragLayer, so
that Folders can be used in other surfaces.
Test: Open and close Folders on home screen, ensure works properly
Bug: 171917176
Change-Id: I39b9aedbd8319ca61ea0e776bc95eab585e023d5
> Fixing crash when some properties are not initialized if draw is not called
> Adding robolectic support for UI testing
> Adding robo tests to verify workspace, all-apps, widgets and folder scrolling
Bug: 147312357
Change-Id: Id7756e07f06396359e441cdff2e4f992bdcb97bb
Whenever blurring, the wallpaper should also zoom out. This is the
mental model of our Depth System.
Test: manual
Bug: 149792636
Change-Id: I1783eb87fefeb6f917f0ba64f2c6ec8f1f2004fa
- Add a new controller to update the background blur on either the
launcher or app surfaces based on state or transition
Bug: 149792636
Change-Id: I6103cd3d53a00c8025558dd49bb73137e2980014
The issue was that the scaled folder size was smaller than the clip size.
To ensure that the folder size is always larger than the clip size, we
instead scale the contents of the folder instead of the folder itself.
Bug: 143703075
Change-Id: I6eadcc487148fe7e2b7dd9f0ff94a9205048b992
> Moving grid calcutation in a separate class
> Moving content saving logic to folder instead of relying on item bind
Bug: 139051851
Change-Id: I81b226dbebe13652482a767c992e8cc8f4f35a60
setAlphaComponent throws expetion for invalid range, which can cause brashes in overshoot
interpolation
Bug: 118390004
Change-Id: Ic9c5ff3d660eba353b982c4c47ccfaf329b3e296
> Creating an abstract interface to represent a folderIcon shape
> Defined few common folder shapes
> Picking the folder shape closest to the AdaptiveIcon shape
Bug: 111433118
Change-Id: Ib35eddbdd6692767aa9dbe6aae1a379a68cc456a
- Add methods to ModelWriter to prepareForUndoDelete, then
enqueueDeleteRunnable, followed by commitDelete or abortDelete.
- Add Snackbar floating view
- Show Undo snackbar when dropping or flinging to delete target; if the
undo action is clicked, we abort the delete, otherwise we commit it.
Bug: 24238108
Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
(This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975)
Various animations were marked for cancellation when launcher activity is
destroyed. This this does not work with multiple activities (Launcher,
fallback recents, shortcut confirmation). Also since launcher activity
handles configuration changes, the activity is not destroyed often.
Instead associating a target with various animations which automatically
cancels the animations when that target goes away.
Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
> Removing Widgets and related states
> Fixing different durations being used when opening/closing all-apps
> Removing some unnecessary object allocations when changing state without animation
> Differentiating widget bootm sheel and full sheet in logs
Bug: 67678570
Change-Id: Ic169528736d04ee0b38564b4f96595ba066eabda
The old folder preview and animation relied on creating bitmaps for transition.
As we move to hardware bitmaps, creating custom bitmaps which rely on icon bitmaps
would be costly (hardware bitmaps are immutable and cannot be drawn on a software canvas).
Bug: 35428783
Change-Id: I39869ed44feb6a886985ad15775bc1ab55565727
We now use the current FolderIcon background radius as the
clipping size for the Folder, which results in a smoother
hand-off between the two.
Before this change, the Folder would center itself against the FolderIcon
during the hand-off. This resulted in the preview items being fully-visible
in the FolderIcon, to being clipped in the Folder.
Bug: 63709477
Change-Id: I1da187485f28dde92d171729b011ada47a506f85
If the Folder is not closed on on the first page, we animate the
current page items as if they are in the preview.
When the Folder finishes closing, the first page preview items
slide in as the current page preview items slide out.
Bug: 36022592
Bug: 35064148
Change-Id: I7ede7ed9e091e2a0c3cbe11731744bfe9ce36595
* Use different interpolators so that the prevew items in large folders
appear aligned with the rest of the folder contents longer (the
preview item movements are less jumpy).
* Fixed animation elevation on close.
Bug: 63131666
Bug: 35064148
Change-Id: Iecb1a8d3105e630ee00b3ea4b692979efb928d7d
- 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
The current implementation had the Folder elevation animate in
after the Folder transition was done completing. To make it appear
more smooth, we animate the Folder elevation halfway thru the
transition.
We will keep the separate FolderIcon shadow fade-in animation on
the closing transition otherwise the shadow will be apparent in the
"preview."
Bug: 62787582
Bug: 35064148
Change-Id: Ifd3d84214b0600b6651005c8e65d90b0d8ade422
The goal is to eventually move all of the PreviewBackground and
Preview Item drawing out of the FolderIcon class.
Bug: 36022592
Change-Id: Ie0552bb4ca8a7e232c1c454a23558940e9394a14
The animator in BubbleTextView maintains an internal state which was getting
invalidated by the FolderAnimator.
Change-Id: I53885fe8f1773ca62fe59f1712056f02ff9a749f
This is done in preparation for new PreviewBackground animation
where we will be animating in the first page preview items when
closing the Folder from a non-first page.
Bug: 36022592
Bug: 35064148
Change-Id: Id4d54da16ddfa852ca639a2dc8d328307d4d443a
The shadow from the top of the Folder is visible through
the transparent part of the 'preview' background. When we
remove the elevation as part of the animation, the shadow
jumps into visibility when the animation is done.
To solve this, we remove the elevation during the Folder animation and
* Animate the elevation at the end of the Folder opening animation.
* Animate the shadow of the FolderIcon bg in once the Folder is closed.
Bug: 62787582
Bug: 35064148
Change-Id: Id5d8fcbfa4f74882531334f12488560da2496faf
1. Start preview item animations later opening
2. Finish item animations sooner when closing
3. 1 & 2 allow the preview items to move as part of
the Folder and allows for a smoother animation
4. Remove setCurrentPlayTime as it is O API.
Bug: 36522198
Bug: 35064148
Change-Id: If63d4d032078ff4e28b72a09e35da3a71f1d0e27
With larger folders, we want the preview items to reach their final positions faster
(when opening) and later (when closing) so that they appear aligned with the rest of
the folder items when they are both visible.
Bug: 35064148
Change-Id: I170ac2db36a3a20ebe5505711ea59e625050bc1b
When we open the Folder, we set the FolderIcon to View.INVISIBLE.
It is possible to close the Folder without animating it (ie. when apps
are being auto added / auto closed to Work Profile Folder), and so the
FolderIcon is never set to View.VISIBLE.
Bug: 35064148
Change-Id: I2fc5b7ecaceffde0a3f3875870897c18e6e8dadf
This can happen where you drag a new item to a Folder that has
a full first page.
Bug: 36022385
Bug: 35064148
Change-Id: I092a79a13b7f779f09ee7a79488a16fe8bfbc2fd
Added FolderAnimationManager, which manages the opening
and closing animations.
All of the animations are done in the Folder.
ie. When the users taps on the FolderIcon, we immediately hide the
FolderIcon and show the Folder inits place before starting the animation.
Bug: 35064148
Change-Id: Icacdbbf78a25489f2eab4fd352f2c6ed71eb710b