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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user