From 57aba63583701ea6c024e9e9d7ba8d0de49b8bbe Mon Sep 17 00:00:00 2001 From: Bharath MG Date: Tue, 21 Apr 2015 21:28:02 +0530 Subject: [PATCH] Revert "Retain list view element's original Alpha value" This reverts commit 9fb7a5c011f31ae287dde459a34ee441dd4317c2. Conflicts: src/com/example/android/swipedismiss/SwipeDismissListViewTouchListener.java src/com/example/android/swipedismiss/SwipeDismissTouchListener.java --- .../SwipeDismissListViewTouchListener.java | 2 +- .../swipedismiss/SwipeDismissTouchListener.java | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/com/example/android/swipedismiss/SwipeDismissListViewTouchListener.java b/src/com/example/android/swipedismiss/SwipeDismissListViewTouchListener.java index 0be95aa..5c5fbcc 100644 --- a/src/com/example/android/swipedismiss/SwipeDismissListViewTouchListener.java +++ b/src/com/example/android/swipedismiss/SwipeDismissListViewTouchListener.java @@ -423,4 +423,4 @@ public void onAnimationUpdate(ValueAnimator valueAnimator) { mPendingDismisses.add(new PendingDismissData(dismissPosition, dismissView)); animator.start(); } -} \ No newline at end of file +} diff --git a/src/com/example/android/swipedismiss/SwipeDismissTouchListener.java b/src/com/example/android/swipedismiss/SwipeDismissTouchListener.java index ab2503b..9071b3d 100644 --- a/src/com/example/android/swipedismiss/SwipeDismissTouchListener.java +++ b/src/com/example/android/swipedismiss/SwipeDismissTouchListener.java @@ -77,9 +77,6 @@ public class SwipeDismissTouchListener implements View.OnTouchListener { private VelocityTracker mVelocityTracker; private float mTranslationX; - //View properties - private float mAlpha = 1f; - /** * The callback interface used by {@link SwipeDismissTouchListener} to inform its client * about a successful dismissal of the view for which it was created. @@ -144,10 +141,6 @@ public boolean onTouch(View view, MotionEvent motionEvent) { mVelocityTracker = VelocityTracker.obtain(); mVelocityTracker.addMovement(motionEvent); } - - if (mView != null) { - mAlpha = mView.getAlpha(); - } return false; } @@ -191,7 +184,7 @@ public boolean onTouch(View view, MotionEvent motionEvent) { mView.animate() .translationX(0) - .alpha(mAlpha) + .alpha(1) .setDuration(mAnimationTime) .setListener(null); reset(); @@ -281,7 +274,7 @@ private void performDismiss() { public void onAnimationEnd(Animator animation) { mCallbacks.onDismiss(mView, mToken); // Reset view presentation - mView.setAlpha(mAlpha); + mView.setAlpha(1f); mView.setTranslationX(0); lp.height = originalHeight; mView.setLayoutParams(lp);