Merge "Several animation calls cleanup" into ub-launcher3-master

This commit is contained in:
Sunny Goyal authored and Android (Google) Code Review committed 2015-08-03 19:23:16 +00:00
commit 4ac89e2444
13 files changed
+64 -118

No files matched your search

+8 -12
View File
@@ -18,7 +18,6 @@ package com.android.launcher3;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
@@ -2161,17 +2160,14 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
a.cancel();
}
AnimatorSet s = LauncherAnimUtils.createAnimatorSet();
a = s;
s.playTogether(
LauncherAnimUtils.ofFloat(child, "scaleX", getChildrenScale()),
LauncherAnimUtils.ofFloat(child, "scaleY", getChildrenScale()),
LauncherAnimUtils.ofFloat(child, "translationX", 0f),
LauncherAnimUtils.ofFloat(child, "translationY", 0f)
);
s.setDuration(REORDER_ANIMATION_DURATION);
s.setInterpolator(new android.view.animation.DecelerateInterpolator(1.5f));
s.start();
a = new LauncherViewPropertyAnimator(child)
.scaleX(getChildrenScale())
.scaleY(getChildrenScale())
.translationX(0)
.translationY(0)
.setDuration(REORDER_ANIMATION_DURATION);
a.setInterpolator(new android.view.animation.DecelerateInterpolator(1.5f));
a.start();
}
}