Skip to content

Commit

Permalink
Revert "Retain list view element's original Alpha value"
Browse files Browse the repository at this point in the history
This reverts commit 9fb7a5c.

Conflicts:
	src/com/example/android/swipedismiss/SwipeDismissListViewTouchListener.java
	src/com/example/android/swipedismiss/SwipeDismissTouchListener.java
  • Loading branch information
BharathMG committed Apr 21, 2015
1 parent 7555c49 commit 57aba63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,4 @@ public void onAnimationUpdate(ValueAnimator valueAnimator) {
mPendingDismisses.add(new PendingDismissData(dismissPosition, dismissView));
animator.start();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -191,7 +184,7 @@ public boolean onTouch(View view, MotionEvent motionEvent) {

mView.animate()
.translationX(0)
.alpha(mAlpha)
.alpha(1)
.setDuration(mAnimationTime)
.setListener(null);
reset();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 57aba63

Please sign in to comment.