mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Merge "[Unfold animation] Adjust animation parameters" into tm-qpr-dev am: 927875c6cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21850203 Change-Id: Icf993567039d463e893cf7ce29d898d06ac8be9b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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<?>> WORKSPACE_SCALE_PROPERTY =
|
||||
WORKSPACE_SCALE_PROPERTY_FACTORY.get(SCALE_INDEX_UNFOLD_ANIMATION);
|
||||
private static final FloatProperty<Hotseat> 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) {
|
||||
|
||||
Reference in New Issue
Block a user