diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 7b71ff4..40bc2ca 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -762,7 +762,12 @@
     }
 
     @Override
-    public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
+    public View getContent() {
+        return null;
+    }
+
+    @Override
+    public void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean toWorkspace) {
         mInTransition = true;
         if (toWorkspace) {
             cancelAllTasks();
@@ -770,8 +775,7 @@
     }
 
     @Override
-    public View getContent() {
-        return null;
+    public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
     }
 
     @Override
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 34b7c09..01c08c9 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -376,8 +376,8 @@
 
     /* LauncherTransitionable overrides */
     @Override
-    public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
-        mAppsCustomizePane.onLauncherTransitionStart(l, animated, toWorkspace);
+    public void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean toWorkspace) {
+        mAppsCustomizePane.onLauncherTransitionPrepare(l, animated, toWorkspace);
         mInTransition = true;
         mTransitioningToWorkspace = toWorkspace;
 
@@ -404,7 +404,10 @@
             mAppsCustomizePane.reset();
             mResetAfterTransition = false;
         }
+    }
 
+    @Override
+    public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
         if (animated) {
             enableAndBuildHardwareLayer();
         }
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 7b9b36e..648791d 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2166,6 +2166,12 @@
         }
     }
 
+    private void dispatchOnLauncherTransitionPrepare(View v, boolean animated, boolean toWorkspace) {
+        if (v instanceof LauncherTransitionable) {
+            ((LauncherTransitionable) v).onLauncherTransitionPrepare(this, animated, toWorkspace);
+        }
+    }
+
     private void dispatchOnLauncherTransitionStart(View v, boolean animated, boolean toWorkspace) {
         if (v instanceof LauncherTransitionable) {
             ((LauncherTransitionable) v).onLauncherTransitionStart(this, animated, toWorkspace);
@@ -2246,7 +2252,7 @@
         final int fadeDuration = res.getInteger(R.integer.config_appsCustomizeFadeInTime);
         final float scale = (float) res.getInteger(R.integer.config_appsCustomizeZoomScaleFactor);
         final View fromView = mWorkspace;
-        final View toView = mAppsCustomizeTabHost;
+        final AppsCustomizeTabHost toView = mAppsCustomizeTabHost;
         final int startDelay =
                 res.getInteger(R.integer.config_workspaceAppsCustomizeAnimationStagger);
 
@@ -2326,8 +2332,8 @@
             boolean delayAnim = false;
             final ViewTreeObserver observer;
 
-            dispatchOnLauncherTransitionStart(fromView, animated, false);
-            dispatchOnLauncherTransitionStart(toView, animated, false);
+            dispatchOnLauncherTransitionPrepare(fromView, animated, false);
+            dispatchOnLauncherTransitionPrepare(toView, animated, false);
 
             // If any of the objects being animated haven't been measured/laid out
             // yet, delay the animation until we get a layout pass
@@ -2351,6 +2357,8 @@
                                 if (mStateAnimation == stateAnimation) {
                                     // Need to update pivots for zoom if layout changed
                                     setPivotsForZoom(toView, scale);
+                                    dispatchOnLauncherTransitionStart(fromView, animated, false);
+                                    dispatchOnLauncherTransitionStart(toView, animated, false);
                                     mStateAnimation.start();
                                 }
                             }
@@ -2361,6 +2369,8 @@
                 observer.addOnGlobalLayoutListener(delayedStart);
             } else {
                 setPivotsForZoom(toView, scale);
+                dispatchOnLauncherTransitionStart(fromView, animated, false);
+                dispatchOnLauncherTransitionStart(toView, animated, false);
                 mStateAnimation.start();
             }
         } else {
@@ -2376,8 +2386,10 @@
                 mWorkspace.hideScrollingIndicator(true);
                 hideDockDivider();
             }
+            dispatchOnLauncherTransitionPrepare(fromView, animated, false);
             dispatchOnLauncherTransitionStart(fromView, animated, false);
             dispatchOnLauncherTransitionEnd(fromView, animated, false);
+            dispatchOnLauncherTransitionPrepare(toView, animated, false);
             dispatchOnLauncherTransitionStart(toView, animated, false);
             dispatchOnLauncherTransitionEnd(toView, animated, false);
             updateWallpaperVisibility(false);
@@ -2442,8 +2454,8 @@
 
             mStateAnimation = new AnimatorSet();
 
-            dispatchOnLauncherTransitionStart(fromView, animated, true);
-            dispatchOnLauncherTransitionStart(toView, animated, true);
+            dispatchOnLauncherTransitionPrepare(fromView, animated, true);
+            dispatchOnLauncherTransitionPrepare(toView, animated, true);
 
             mStateAnimation.addListener(new AnimatorListenerAdapter() {
                 @Override
@@ -2465,11 +2477,15 @@
             if (workspaceAnim != null) {
                 mStateAnimation.play(workspaceAnim);
             }
+            dispatchOnLauncherTransitionStart(fromView, animated, true);
+            dispatchOnLauncherTransitionStart(toView, animated, true);
             mStateAnimation.start();
         } else {
             fromView.setVisibility(View.GONE);
+            dispatchOnLauncherTransitionPrepare(fromView, animated, true);
             dispatchOnLauncherTransitionStart(fromView, animated, true);
             dispatchOnLauncherTransitionEnd(fromView, animated, true);
+            dispatchOnLauncherTransitionPrepare(toView, animated, true);
             dispatchOnLauncherTransitionStart(toView, animated, true);
             dispatchOnLauncherTransitionEnd(toView, animated, true);
             mWorkspace.hideScrollingIndicator(false);
@@ -3457,6 +3473,7 @@
 
 interface LauncherTransitionable {
     View getContent();
+    void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean toWorkspace);
     void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace);
     void onLauncherTransitionStep(Launcher l, float t);
     void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 8be002c..29aea6f 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1745,12 +1745,16 @@
     }
 
     @Override
-    public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
+    public void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean toWorkspace) {
         mIsSwitchingState = true;
         cancelScrollingIndicatorAnimations();
     }
 
     @Override
+    public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
+    }
+
+    @Override
     public void onLauncherTransitionStep(Launcher l, float t) {
         mTransitionProgress = t;
     }
