diff options
author | Tony Wickham <twickham@google.com> | 2018-05-18 16:57:01 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2018-06-06 23:20:58 +0000 |
commit | b45444b250cb76ed264329b6b4fceaa33f7f1479 (patch) | |
tree | d202e379a16a9d66081450e7dac95013fb206830 /src/com/android/launcher3/anim/AnimatorPlaybackController.java | |
parent | f75fa0f8e2ec3281caf0d63b5762a7addd56f50e (diff) | |
download | android_packages_apps_Trebuchet-b45444b250cb76ed264329b6b4fceaa33f7f1479.tar.gz android_packages_apps_Trebuchet-b45444b250cb76ed264329b6b4fceaa33f7f1479.tar.bz2 android_packages_apps_Trebuchet-b45444b250cb76ed264329b6b4fceaa33f7f1479.zip |
Overshoot when flinging up from an app
- Use OvershootInterpolator based on velocity (consistent with swiping up
from home)
- Scale down recents as well, to be consistent with adjacent pages scaling
up when you launch a task
Bug: 109709720
Change-Id: Ie47309058ccf673a4b86c40c843c415beb2d8dc7
Diffstat (limited to 'src/com/android/launcher3/anim/AnimatorPlaybackController.java')
-rw-r--r-- | src/com/android/launcher3/anim/AnimatorPlaybackController.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher3/anim/AnimatorPlaybackController.java b/src/com/android/launcher3/anim/AnimatorPlaybackController.java index 84085cb6c..50fb0a51a 100644 --- a/src/com/android/launcher3/anim/AnimatorPlaybackController.java +++ b/src/com/android/launcher3/anim/AnimatorPlaybackController.java @@ -202,6 +202,19 @@ public abstract class AnimatorPlaybackController implements ValueAnimator.Animat } } + public void dispatchSetInterpolator(TimeInterpolator interpolator) { + dispatchSetInterpolatorRecursively(mAnim, interpolator); + } + + private void dispatchSetInterpolatorRecursively(Animator anim, TimeInterpolator interpolator) { + anim.setInterpolator(interpolator); + if (anim instanceof AnimatorSet) { + for (Animator child : nonNullList(((AnimatorSet) anim).getChildAnimations())) { + dispatchSetInterpolatorRecursively(child, interpolator); + } + } + } + public void setOnCancelRunnable(Runnable runnable) { mOnCancelRunnable = runnable; } |