am 652b7915: Merge "Improve swipe performance in Recents" into jb-mr2-dev

* commit '652b79153f78033494bd6c77e3418cefff2ff48a':
  Improve swipe performance in Recents
This commit is contained in:
Michael Jurka
2013-03-06 21:03:10 +00:00
committed by Android Git Automerger

View File

@@ -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);