summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-08-13 16:10:14 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-08-13 16:10:18 -0700
commitf0b6db7fa81799d7db350c5d667ef4b83657f840 (patch)
tree3d2d65ecd57c5de3ff90236dc80526141cb7f46f /src/com/android/launcher3/CellLayout.java
parentb6ecb17356da95cdc4c9d66d1a47024a38fc4d23 (diff)
downloadpackages_apps_Trebuchet-f0b6db7fa81799d7db350c5d667ef4b83657f840.tar.gz
packages_apps_Trebuchet-f0b6db7fa81799d7db350c5d667ef4b83657f840.tar.bz2
packages_apps_Trebuchet-f0b6db7fa81799d7db350c5d667ef4b83657f840.zip
Removing static launcher activity dependency from FirstFrameAnimationHelper
Static dependency does not work in the presence of multiple activities and when the main activity is not Launcher (eg in fallback recents). Instead creating FirstFrameAnimatorHelper on demand for individual animations. Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 260abd1aa..f52a4d675 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -16,6 +16,8 @@
package com.android.launcher3;
+import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
+
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
@@ -1921,7 +1923,7 @@ public class CellLayout extends ViewGroup {
public static final int MODE_PREVIEW = 1;
float animationProgress = 0;
- Animator a;
+ ValueAnimator a;
public ReorderPreviewAnimation(View child, int mode, int cellX0, int cellY0, int cellX1,
int cellY1, int spanX, int spanY) {
@@ -2039,14 +2041,14 @@ public class CellLayout extends ViewGroup {
}
setInitialAnimationValues(true);
- a = LauncherAnimUtils.ofPropertyValuesHolder(child,
- new PropertyListBuilder()
- .scale(initScale)
- .translationX(initDeltaX)
- .translationY(initDeltaY)
- .build())
+ a = new PropertyListBuilder()
+ .scale(initScale)
+ .translationX(initDeltaX)
+ .translationY(initDeltaY)
+ .build(child)
.setDuration(REORDER_ANIMATION_DURATION);
- a.setInterpolator(new android.view.animation.DecelerateInterpolator(1.5f));
+ mLauncher.getDragController().addFirstFrameAnimationHelper(a);
+ a.setInterpolator(DEACCEL_1_5);
a.start();
}
}