Merge "Improve swipe performance in Recents" into jb-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
652b79153f
@ -156,6 +156,12 @@ public class SwipeHelper implements Gefingerpoken {
|
||||
|
||||
private void updateAlphaFromOffset(View animView, boolean dismissable) {
|
||||
if (FADE_OUT_DURING_SWIPE && dismissable) {
|
||||
float alpha = getAlphaForOffset(animView);
|
||||
if (alpha != 0f && alpha != 1f) {
|
||||
animView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
} else {
|
||||
animView.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
}
|
||||
animView.setAlpha(getAlphaForOffset(animView));
|
||||
}
|
||||
invalidateGlobalRegion(animView);
|
||||
|
Reference in New Issue
Block a user