summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-01-31 14:51:56 -0800
committerWinson Chung <winsonc@google.com>2011-01-31 14:53:20 -0800
commit32bb5e54b498f721e021fc9ff780280625c3fe28 (patch)
tree2445c60c053740d0341c08f69f52aac688942a7b /src/com/android/launcher2/Launcher.java
parentc73c656812612676c74df40cd7f8d29760a58008 (diff)
downloadandroid_packages_apps_Trebuchet-32bb5e54b498f721e021fc9ff780280625c3fe28.tar.gz
android_packages_apps_Trebuchet-32bb5e54b498f721e021fc9ff780280625c3fe28.tar.bz2
android_packages_apps_Trebuchet-32bb5e54b498f721e021fc9ff780280625c3fe28.zip
Workaround for the issue where a layout is not being triggered when rotating the screen while customizing. (3329988)
Change-Id: I3348bd2a381608592bef774da3851ec61cd69b29
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index f3208d0b8..3777410fd 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -3476,6 +3476,15 @@ public final class Launcher extends Activity
mSavedInstanceState = null;
}
+ // Workaround a bug that occurs when rotating the device while the customization mode is
+ // open, we trigger a new layout on all the CellLayout children.
+ if (LauncherApplication.isScreenXLarge() && (mState == State.CUSTOMIZE)) {
+ final int childCount = mWorkspace.getChildCount();
+ for (int i = 0; i < childCount; ++i) {
+ mWorkspace.getChildAt(i).requestLayout();
+ }
+ }
+
mWorkspaceLoading = false;
}