summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-09-22 21:09:19 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-22 21:09:19 +0000
commitf2e075133ee1c705de16e99dfecf47871dd7abcb (patch)
tree3ac144c2b7742f070f16e74b41b21b130b594776 /src/com/android/launcher3/shortcuts
parent99fed5fa07e2819726c69fc649a6a1b6f21b1539 (diff)
parente5a00c6172080b9dcdc5a2a2a942497b2f8f58f3 (diff)
downloadandroid_packages_apps_Trebuchet-f2e075133ee1c705de16e99dfecf47871dd7abcb.tar.gz
android_packages_apps_Trebuchet-f2e075133ee1c705de16e99dfecf47871dd7abcb.tar.bz2
android_packages_apps_Trebuchet-f2e075133ee1c705de16e99dfecf47871dd7abcb.zip
Move shortcut fade interpolator outside of loop.
am: e5a00c6172 Change-Id: I7b2c15b04a7656b136f5d6f0c54f13030c5b9563
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
index ea6590d80..df393d3b6 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
@@ -19,6 +19,7 @@ package com.android.launcher3.shortcuts;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
+import android.animation.TimeInterpolator;
import android.annotation.TargetApi;
import android.content.ComponentName;
import android.content.Context;
@@ -235,6 +236,7 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC
final long arrowScaleDelay = duration - arrowScaleDuration;
final long stagger = getResources().getInteger(
R.integer.config_deepShortcutOpenStagger);
+ final TimeInterpolator fadeInterpolator = new LogAccelerateInterpolator(100, 0);
// Animate shortcuts
DecelerateInterpolator interpolator = new DecelerateInterpolator();
@@ -257,7 +259,7 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC
shortcutAnims.play(anim);
Animator fadeAnim = new LauncherViewPropertyAnimator(deepShortcutView).alpha(1);
- fadeAnim.setInterpolator(new LogAccelerateInterpolator(100, 0));
+ fadeAnim.setInterpolator(fadeInterpolator);
// We want the shortcut to be fully opaque before the arrow starts animating.
fadeAnim.setDuration(arrowScaleDelay);
shortcutAnims.play(fadeAnim);
@@ -625,6 +627,7 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC
R.integer.config_deepShortcutArrowOpenDuration);
final long stagger = getResources().getInteger(
R.integer.config_deepShortcutCloseStagger);
+ final TimeInterpolator fadeInterpolator = new LogAccelerateInterpolator(100, 0);
int firstOpenShortcutIndex = mIsAboveIcon ? shortcutCount - numOpenShortcuts : 0;
for (int i = firstOpenShortcutIndex; i < firstOpenShortcutIndex + numOpenShortcuts; i++) {
@@ -640,7 +643,7 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC
// Don't start fading until the arrow is gone.
fadeAnim.setStartDelay(stagger * animationIndex + arrowScaleDuration);
fadeAnim.setDuration(duration - arrowScaleDuration);
- fadeAnim.setInterpolator(new LogAccelerateInterpolator(100, 0));
+ fadeAnim.setInterpolator(fadeInterpolator);
shortcutAnims.play(fadeAnim);
} else {
// The view is being dragged. Animate it such that it collapses with the drag view