summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-02-13 12:13:43 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-02-16 11:19:01 -0800
commit9e76f682f3e52afa1f11172564b883c7dfda5063 (patch)
tree6e62354e0a5314ce2dea3a59850555a0ae1e220c /src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
parenteb04b8415368ce28bacd100b8bffa85fede734a0 (diff)
downloadandroid_packages_apps_Trebuchet-9e76f682f3e52afa1f11172564b883c7dfda5063.tar.gz
android_packages_apps_Trebuchet-9e76f682f3e52afa1f11172564b883c7dfda5063.tar.bz2
android_packages_apps_Trebuchet-9e76f682f3e52afa1f11172564b883c7dfda5063.zip
Removing wrapper around ViewPropertyAnimator, and using ObjectAnimator
instead Bug: 35218222 Change-Id: Ic714cf7d20989cb45f07712e8a6f6659d0e3f30d
Diffstat (limited to 'src/com/android/launcher3/WorkspaceStateTransitionAnimation.java')
-rw-r--r--src/com/android/launcher3/WorkspaceStateTransitionAnimation.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
index 6a71befe4..482a2c93b 100644
--- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
+++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
@@ -31,6 +31,7 @@ import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.DecelerateInterpolator;
import com.android.launcher3.anim.AnimationLayerSet;
+import com.android.launcher3.anim.PropertyListBuilder;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.util.Thunk;
@@ -337,10 +338,9 @@ public class WorkspaceStateTransitionAnimation {
if (animated) {
float oldBackgroundAlpha = cl.getBackgroundAlpha();
if (initialAlpha != finalAlpha) {
- LauncherViewPropertyAnimator alphaAnim =
- new LauncherViewPropertyAnimator(cl.getShortcutsAndWidgets());
- alphaAnim.alpha(finalAlpha)
- .setDuration(duration)
+ Animator alphaAnim = ObjectAnimator.ofFloat(
+ cl.getShortcutsAndWidgets(), View.ALPHA, finalAlpha);
+ alphaAnim.setDuration(duration)
.setInterpolator(mZoomInInterpolator);
mStateAnimator.play(alphaAnim);
}
@@ -377,17 +377,16 @@ public class WorkspaceStateTransitionAnimation {
.animateAlphaAtIndex(finalQsbAlpha, Workspace.QSB_ALPHA_INDEX_STATE_CHANGE);
if (animated) {
- LauncherViewPropertyAnimator scale = new LauncherViewPropertyAnimator(mWorkspace);
- scale.scaleX(mNewScale)
- .scaleY(mNewScale)
- .translationY(finalWorkspaceTranslationY)
- .setDuration(duration)
- .setInterpolator(mZoomInInterpolator);
+ Animator scale = LauncherAnimUtils.ofPropertyValuesHolder(mWorkspace,
+ new PropertyListBuilder().scale(mNewScale)
+ .translationY(finalWorkspaceTranslationY).build())
+ .setDuration(duration);
+ scale.setInterpolator(mZoomInInterpolator);
mStateAnimator.play(scale);
Animator hotseatAlpha = mWorkspace.createHotseatAlphaAnimator(finalHotseatAlpha);
- LauncherViewPropertyAnimator overviewPanelAlpha =
- new LauncherViewPropertyAnimator(overviewPanel).alpha(finalOverviewPanelAlpha);
+ Animator overviewPanelAlpha = ObjectAnimator.ofFloat(
+ overviewPanel, View.ALPHA, finalOverviewPanelAlpha);
overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel,
accessibilityEnabled));