diff options
author | Jon Miranda <jonmiranda@google.com> | 2018-06-25 16:42:58 -0700 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2018-06-25 16:42:58 -0700 |
commit | c9a7c50fac2552b96c4f80587494afcb0da78aab (patch) | |
tree | 5be0e11108c5383e14bde8c358d241b80c448425 /src/com/android/launcher3/anim/Interpolators.java | |
parent | 563bc3d1faae4be3c998ba89c5d102acf4f2dba8 (diff) | |
download | android_packages_apps_Trebuchet-c9a7c50fac2552b96c4f80587494afcb0da78aab.tar.gz android_packages_apps_Trebuchet-c9a7c50fac2552b96c4f80587494afcb0da78aab.tar.bz2 android_packages_apps_Trebuchet-c9a7c50fac2552b96c4f80587494afcb0da78aab.zip |
Tune app closing/launcher resume animation "spring" values.
Bug: 109828964
Change-Id: I64252667451f511b7affdde5ffb28812876e7f4c
Diffstat (limited to 'src/com/android/launcher3/anim/Interpolators.java')
-rw-r--r-- | src/com/android/launcher3/anim/Interpolators.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/anim/Interpolators.java b/src/com/android/launcher3/anim/Interpolators.java index 8a1abf412..389da4807 100644 --- a/src/com/android/launcher3/anim/Interpolators.java +++ b/src/com/android/launcher3/anim/Interpolators.java @@ -119,18 +119,20 @@ public class Interpolators { public static final Interpolator OSCILLATE = new Interpolator() { // Used to scale the oscillations horizontally - private final float horizontalScale = 1f; + private final float horizontalScale = 4f; // Used to shift the oscillations horizontally - private final float horizontalShift = 0.5f; + private final float horizontalShift = 0.22f; // Used to scale the oscillations vertically private final float verticalScale = 1f; // Used to shift the oscillations vertically private final float verticalShift = 1f; + // Amplitude of oscillation + private final float amplitude = 0.9f; @Override public float getInterpolation(float t) { t = horizontalScale * (t + horizontalShift); - return (float) ((verticalScale * (Math.exp(-t) * Math.cos(2 * Math.PI * t))) + return (float) ((verticalScale * (Math.exp(-t) * Math.cos(amplitude * Math.PI * t))) + verticalShift); } }; |