From 32bb5e54b498f721e021fc9ff780280625c3fe28 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 31 Jan 2011 14:51:56 -0800 Subject: [PATCH] Workaround for the issue where a layout is not being triggered when rotating the screen while customizing. (3329988) Change-Id: I3348bd2a381608592bef774da3851ec61cd69b29 --- src/com/android/launcher2/Launcher.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index f3208d0b88..3777410fd6 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; }