Small optimizations for the All Apps transition

- don't set properties in animations if they don't
change
- don't recalculate visible pages on every frame
- don't require scroll indicator to be an
ImageView

Change-Id: I099b29e677da2d0e401f677d47cdb8b5df51224e
This commit is contained in:
Michael Jurka
2011-12-13 18:22:50 -08:00
parent 2484e70c0b
commit afaa05014e
3 changed files with 15 additions and 10 deletions
+5 -2
View File
@@ -916,8 +916,10 @@ public class CellLayout extends ViewGroup {
}
public void setBackgroundAlpha(float alpha) {
mBackgroundAlpha = alpha;
invalidate();
if (mBackgroundAlpha != alpha) {
mBackgroundAlpha = alpha;
invalidate();
}
}
// Need to return true to let the view system know we know how to handle alpha-- this is
@@ -928,6 +930,7 @@ public class CellLayout extends ViewGroup {
return true;
}
@Override
public void setAlpha(float alpha) {
setChildrenAlpha(alpha);
super.setAlpha(alpha);