diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 5eaf7730af..4ae23a30d3 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -244,6 +244,12 @@ public final class Launcher extends Activity private BubbleTextView mWaitingForResume; + private Runnable mBuildLayersRunnable = new Runnable() { + public void run() { + mWorkspace.buildPageHardwareLayers(); + } + }; + private static ArrayList sPendingAddList = new ArrayList(); @@ -550,6 +556,9 @@ public final class Launcher extends Activity // When we resume Launcher, a different Activity might be responsible for the app // market intent, so refresh the icon updateAppMarketIcon(); + if (!mWorkspaceLoading) { + mWorkspace.post(mBuildLayersRunnable); + } } @Override @@ -2964,6 +2973,8 @@ public final class Launcher extends Activity // Update the market app icon as necessary (the other icons will be managed in response to // package changes in bindSearchablesChanged() updateAppMarketIcon(); + + mWorkspace.post(mBuildLayersRunnable); } @Override diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 9c25afc642..8a492a28e3 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -313,6 +313,16 @@ public class Workspace extends SmoothPagedView setMotionEventSplittingEnabled(true); } + public void buildPageHardwareLayers() { + if (getWindowToken() != null) { + final int childCount = getChildCount(); + for (int i = 0; i < childCount; i++) { + CellLayout cl = (CellLayout) getChildAt(i); + cl.buildChildrenLayer(); + } + } + } + public void onDragStart(DragSource source, Object info, int dragAction) { mIsDragOccuring = true; updateChildrenLayersEnabled();