Merge "Fix blip after notifications are swiped"

This commit is contained in:
Michael Jurka
2012-02-23 23:58:30 -08:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 4 deletions

View File

@@ -236,10 +236,6 @@ public class SwipeHelper {
public void onAnimationEnd(Animator animation) {
mCallback.onChildDismissed(view);
animView.setLayerType(View.LAYER_TYPE_NONE, null);
// Restore the alpha/translation parameters to what they were before swiping
// (for when these items are recycled)
animView.setAlpha(1f);
setTranslation(animView, 0f);
}
});
anim.addUpdateListener(new AnimatorUpdateListener() {

View File

@@ -181,6 +181,11 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView
mLinearLayout.removeView(v);
mCallback.handleSwipe(v);
v.setActivated(false);
// Restore the alpha/translation parameters to what they were before swiping
// (for when these items are recycled)
View contentView = getChildContentView(v);
contentView.setAlpha(1f);
contentView.setTranslationY(0);
}
public void onBeginDrag(View v) {

View File

@@ -187,6 +187,11 @@ public class RecentsVerticalScrollView extends ScrollView implements SwipeHelper
mLinearLayout.removeView(v);
mCallback.handleSwipe(v);
v.setActivated(false);
// Restore the alpha/translation parameters to what they were before swiping
// (for when these items are recycled)
View contentView = getChildContentView(v);
contentView.setAlpha(1f);
contentView.setTranslationX(0);
}
public void onBeginDrag(View v) {