diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-01-19 14:26:18 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-01-19 14:26:44 -0800 |
commit | 19d32b76dd218a36443497e33f0e08f91abd0900 (patch) | |
tree | cfee062efbe3a8783d3087d21e6292047840eaa5 /src/com/android/launcher3/WorkspaceStateTransitionAnimation.java | |
parent | d8a3f3c2511f05112315a6f37938ccf33eb8cbdd (diff) | |
download | android_packages_apps_Trebuchet-19d32b76dd218a36443497e33f0e08f91abd0900.tar.gz android_packages_apps_Trebuchet-19d32b76dd218a36443497e33f0e08f91abd0900.tar.bz2 android_packages_apps_Trebuchet-19d32b76dd218a36443497e33f0e08f91abd0900.zip |
Removing multi-state apha control for hotseat
Change-Id: I68ccbe96caa70921aefd18fc8ec9ad0638c3fab1
Diffstat (limited to 'src/com/android/launcher3/WorkspaceStateTransitionAnimation.java')
-rw-r--r-- | src/com/android/launcher3/WorkspaceStateTransitionAnimation.java | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java index cf35e527a..21f5d671e 100644 --- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java @@ -138,9 +138,8 @@ public class WorkspaceStateTransitionAnimation { propertySetter.setFloat(mWorkspace, View.TRANSLATION_Y, scaleAndTranslation[2], Interpolators.ZOOM_IN); - float hotseatAlpha = state.getHoseatAlpha(mLauncher); - propertySetter.setViewAlpha(mWorkspace.createHotseatAlphaAnimator(hotseatAlpha), - mLauncher.getHotseat(), hotseatAlpha); + propertySetter.setViewAlpha(mLauncher.getHotseat(), state.getHoseatAlpha(mLauncher), + pageAlphaProvider.interpolator); // Set scrim propertySetter.setInt(mLauncher.getDragLayer().getScrim(), DRAWABLE_ALPHA, @@ -165,11 +164,7 @@ public class WorkspaceStateTransitionAnimation { public static class PropertySetter { - public void setViewAlpha(Animator anim, View view, float alpha) { - if (anim != null) { - anim.end(); - return; - } + public void setViewAlpha(View view, float alpha, TimeInterpolator interpolator) { view.setAlpha(alpha); AlphaUpdateListener.updateVisibility(view, isAccessibilityEnabled(view.getContext())); } @@ -196,17 +191,14 @@ public class WorkspaceStateTransitionAnimation { } @Override - public void setViewAlpha(Animator anim, View view, float alpha) { - if (anim == null) { - if (view.getAlpha() == alpha) { - return; - } - anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha); - anim.addListener(new AlphaUpdateListener(view, - isAccessibilityEnabled(view.getContext()))); + public void setViewAlpha(View view, float alpha, TimeInterpolator interpolator) { + if (view.getAlpha() == alpha) { + return; } - - anim.setDuration(mDuration).setInterpolator(getFadeInterpolator(alpha)); + ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha); + anim.addListener(new AlphaUpdateListener( + view, isAccessibilityEnabled(view.getContext()))); + anim.setDuration(mDuration).setInterpolator(interpolator); mStateAnimator.play(anim); } |