From 6a9535e00c400b9bbe82520e193214b00600fe32 Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Tue, 7 Mar 2023 17:55:58 +0000 Subject: [PATCH] [Unfold animation] Adjust animation parameters Turns down the amount of translation/scale of the animation to make it more subtle. Bug: 271563317 Test: manual Change-Id: I1cdd045cf4e045a9a238e71a6315d7d813e9f398 --- .../quickstep/util/LauncherUnfoldAnimationController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java index fdbb11943b..8fdafc6059 100644 --- a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java +++ b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java @@ -44,7 +44,7 @@ public class LauncherUnfoldAnimationController { // Percentage of the width of the quick search bar that will be reduced // from the both sides of the bar when progress is 0 - private static final float MAX_WIDTH_INSET_FRACTION = 0.15f; + private static final float MAX_WIDTH_INSET_FRACTION = 0.04f; private static final FloatProperty> WORKSPACE_SCALE_PROPERTY = WORKSPACE_SCALE_PROPERTY_FACTORY.get(SCALE_INDEX_UNFOLD_ANIMATION); private static final FloatProperty HOTSEAT_SCALE_PROPERTY = @@ -156,6 +156,8 @@ public class LauncherUnfoldAnimationController { private class LauncherScaleAnimationListener implements TransitionProgressListener { + private static final float SCALE_LAUNCHER_FROM = 0.92f; + @Override public void onTransitionStarted() { mLauncher.getWorkspace().setPivotToScaleWithSelf(mLauncher.getHotseat()); @@ -168,7 +170,7 @@ public class LauncherUnfoldAnimationController { @Override public void onTransitionProgress(float progress) { - setScale(MathUtils.constrainedMap(0.85f, 1, 0, 1, progress)); + setScale(MathUtils.constrainedMap(SCALE_LAUNCHER_FROM, 1, 0, 1, progress)); } private void setScale(float value) {