diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-06-05 17:39:48 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-05 17:39:48 +0000 |
commit | 5eae46ce1581b40870fbbf71925f6ba82dd9798a (patch) | |
tree | 6c163bf13e8b04dc5e50199a31e569507ea0ed92 /src/com/android/launcher3/DragLayer.java | |
parent | 26c2842f07668385b8f4594848cf6e93502da4a3 (diff) | |
parent | 6ff6f6d649f02e605bc1dcd120308ff78186ee61 (diff) | |
download | android_packages_apps_Trebuchet-5eae46ce1581b40870fbbf71925f6ba82dd9798a.tar.gz android_packages_apps_Trebuchet-5eae46ce1581b40870fbbf71925f6ba82dd9798a.tar.bz2 android_packages_apps_Trebuchet-5eae46ce1581b40870fbbf71925f6ba82dd9798a.zip |
Merge "Removing unused animation style" into ub-launcher3-burnaby
Diffstat (limited to 'src/com/android/launcher3/DragLayer.java')
-rw-r--r-- | src/com/android/launcher3/DragLayer.java | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java index 41e053eed..aaa14e6a6 100644 --- a/src/com/android/launcher3/DragLayer.java +++ b/src/com/android/launcher3/DragLayer.java @@ -50,7 +50,6 @@ import java.util.ArrayList; public class DragLayer extends InsettableFrameLayout { public static final int ANIMATION_END_DISAPPEAR = 0; - public static final int ANIMATION_END_FADE_OUT = 1; public static final int ANIMATION_END_REMAIN_VISIBLE = 2; // Scrim color without any alpha component. @@ -70,7 +69,6 @@ public class DragLayer extends InsettableFrameLayout { // Variables relating to animation of views after drop private ValueAnimator mDropAnim = null; - private ValueAnimator mFadeOutAnim = null; private final TimeInterpolator mCubicEaseOutInterpolator = new DecelerateInterpolator(1.5f); @Thunk DragView mDropView = null; @Thunk int mAnchorViewInitialScrollX = 0; @@ -762,7 +760,6 @@ public class DragLayer extends InsettableFrameLayout { final int animationEndStyle, View anchorView) { // Clean up the previous animations if (mDropAnim != null) mDropAnim.cancel(); - if (mFadeOutAnim != null) mFadeOutAnim.cancel(); // Show the drop view if it was previously hidden mDropView = view; @@ -790,9 +787,6 @@ public class DragLayer extends InsettableFrameLayout { case ANIMATION_END_DISAPPEAR: clearAnimatedView(); break; - case ANIMATION_END_FADE_OUT: - fadeOutDragView(); - break; case ANIMATION_END_REMAIN_VISIBLE: break; } @@ -816,31 +810,6 @@ public class DragLayer extends InsettableFrameLayout { return mDropView; } - @Thunk void fadeOutDragView() { - mFadeOutAnim = new ValueAnimator(); - mFadeOutAnim.setDuration(150); - mFadeOutAnim.setFloatValues(0f, 1f); - mFadeOutAnim.removeAllUpdateListeners(); - mFadeOutAnim.addUpdateListener(new AnimatorUpdateListener() { - public void onAnimationUpdate(ValueAnimator animation) { - final float percent = (Float) animation.getAnimatedValue(); - - float alpha = 1 - percent; - mDropView.setAlpha(alpha); - } - }); - mFadeOutAnim.addListener(new AnimatorListenerAdapter() { - public void onAnimationEnd(Animator animation) { - if (mDropView != null) { - mDragController.onDeferredEndDrag(mDropView); - } - mDropView = null; - invalidate(); - } - }); - mFadeOutAnim.start(); - } - @Override public void onChildViewAdded(View parent, View child) { super.onChildViewAdded(parent, child); |