Changed Workspace to inherit from PagedView
- adds support for seeing dimmed side-pages on
home
- adds workspace support for pages that are
smaller than workspace itself
- removing a lot of code duplicated between
PagedView and Workspace
- tested new Workspace on Nexus One, and perf.
was indistinguishable from old Workspace in my
tests
Change-Id: Ie33ab4e8b35ac01b22894cff66650bb0ece8dfcc
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 4c08ca6..7ae26bb 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -630,10 +630,12 @@
}
mDimmedBitmapAlpha = alpha;
setChildrenAlpha(1.0f - mDimmedBitmapAlpha);
+ invalidate();
}
private void setChildrenAlpha(float alpha) {
- for (int i = 0; i < getChildCount(); i++) {
+ final int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
getChildAt(i).setAlpha(alpha);
}
}