From cc6c8848e69f7d758da1ac8fd73897db57908ef3 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Wed, 9 Mar 2011 14:38:14 -0800 Subject: [PATCH] Fix wonky background rendering in spring loaded mode Bug # 4024334 --- src/com/android/launcher2/AllAppsTabbed.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java index aa828b0491..0dd56acff7 100644 --- a/src/com/android/launcher2/AllAppsTabbed.java +++ b/src/com/android/launcher2/AllAppsTabbed.java @@ -177,8 +177,11 @@ public class AllAppsTabbed extends TabHost implements AllAppsView, LauncherTrans // Turn on hardware layers for performance setLayerType(LAYER_TYPE_HARDWARE, null); // Re-enable the rendering of the dimmed background in All Apps for performance reasons - mLauncher.getWorkspace().disableBackground(); - mBackground.setVisibility(VISIBLE); + // if we're fading it in + if (mLauncher.getWorkspace().getBackgroundAlpha() == 0f) { + mLauncher.getWorkspace().disableBackground(); + mBackground.setVisibility(VISIBLE); + } // just a sanity check that we don't build a layer before a call to onLayout if (!mFirstLayout) { // force building the layer at the beginning of the animation, so you don't get a @@ -199,8 +202,10 @@ public class AllAppsTabbed extends TabHost implements AllAppsView, LauncherTrans } // Move the rendering of the dimmed background to workspace after the all apps animation // is done, so that the background is not rendered *above* the mini workspace screens - mLauncher.getWorkspace().enableBackground(); - mBackground.setVisibility(GONE); + if (mBackground.getVisibility() != GONE) { + mLauncher.getWorkspace().enableBackground(); + mBackground.setVisibility(GONE); + } mAllApps.allowHardwareLayerCreation(); }