Swipe interaction changes on home screen

> Increasing the distance to travel for the first swipe
> Adding support for custom interpolators when building an animation
> When quickly swiping twice from home, finished the first animation

Change-Id: Ibc3c8667e9b927376fd99f08f0ca027f2398914b
This commit is contained in:
Sunny Goyal
2018-03-21 09:32:27 -07:00
parent 9869f75825
commit 7a80b59e97
10 changed files with 266 additions and 98 deletions
@@ -3,6 +3,7 @@ package com.android.launcher3.allapps;
import static com.android.launcher3.LauncherState.ALL_APPS_CONTENT;
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER;
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER_EXTRA;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_VERTICAL_PROGRESS;
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
@@ -55,8 +56,6 @@ public class AllAppsTransitionController
}
};
public static final float PARALLAX_COEFFICIENT = .125f;
private AllAppsContainerView mAppsView;
private final Launcher mLauncher;
@@ -169,7 +168,7 @@ public class AllAppsTransitionController
ObjectAnimator anim =
ObjectAnimator.ofFloat(this, ALL_APPS_PROGRESS, mProgress, targetProgress);
anim.setDuration(config.duration);
anim.setInterpolator(interpolator);
anim.setInterpolator(builder.getInterpolator(ANIM_VERTICAL_PROGRESS, interpolator));
anim.addListener(getProgressAnimatorListener());
builder.play(anim);