Add support for taskbar background to wrap around hotseat
Currently only enabled for app launch animation
Future work is planned:
- Overview to home
- App dismiss
- When QSB is drawn inline
Bug: 345768019
Test: Launch an app, taskbar background and stashed handle will
first wrap around hotseat before transforming into the
stashed handle.
Verified by locally forcing taskbar background and
stashed handle to always draw.
Flag: com.android.launcher3.enable_scaling_reveal_home_animation
Change-Id: I9ab1870f87247b6a1b53a352ac3eb0183b7a1a1d
This commit is contained in:
@@ -207,8 +207,11 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
* Creates and returns a {@link RevealOutlineAnimation} Animator that updates the stashed handle
|
||||
* shape and size. When stashed, the shape is a thin rounded pill. When unstashed, the shape
|
||||
* morphs into the size of where the taskbar icons will be.
|
||||
*
|
||||
* @param taskbarToHotseatOffsets A Rect of offsets used to transform the bounds of the
|
||||
* stashed handle to wrap around the hotseat items.
|
||||
*/
|
||||
public Animator createRevealAnimToIsStashed(boolean isStashed) {
|
||||
public Animator createRevealAnimToIsStashed(boolean isStashed, Rect taskbarToHotseatOffsets) {
|
||||
Rect visualBounds = new Rect(mControllers.taskbarViewController.getIconLayoutBounds());
|
||||
float startRadius = mStashedHandleRadius;
|
||||
|
||||
@@ -219,6 +222,13 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
visualBounds.bottom += heightDiff;
|
||||
|
||||
startRadius = visualBounds.height() / 2f;
|
||||
|
||||
// We use these offsets to create a larger stashed handle to wrap around the items
|
||||
// of the hotseat. This is only used for certain animations.
|
||||
visualBounds.top += taskbarToHotseatOffsets.top;
|
||||
visualBounds.bottom += taskbarToHotseatOffsets.bottom;
|
||||
visualBounds.left += taskbarToHotseatOffsets.left;
|
||||
visualBounds.right += taskbarToHotseatOffsets.right;
|
||||
}
|
||||
|
||||
final RevealOutlineAnimation handleRevealProvider = new RoundedRectRevealOutlineProvider(
|
||||
|
||||
Reference in New Issue
Block a user