From 7e0aa59b782e3785acde1e054882524222ef9c9c Mon Sep 17 00:00:00 2001 From: Raj Yengisetty Date: Wed, 13 Aug 2014 11:00:56 -0700 Subject: Set workspace into a transition prepare state before animating into all apps Fix for: https://jira.cyanogenmod.org/browse/BACON-594 Change-Id: I54c168174ebb9a2dd3147f4696caadec817eac4f --- src/com/android/launcher3/Launcher.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/com') diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 2223a5c1e..2ddb5271c 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -3474,9 +3474,6 @@ public class Launcher extends Activity setPivotsForZoom(toView, scale); - // Shrink workspaces away if going to AppsCustomize from workspace - Animator workspaceAnim = - mWorkspace.getChangeStateAnimation(Workspace.State.SMALL, animated); if (!LauncherAppState.isDisableAllApps() || contentType == AppsCustomizePagedView.ContentType.Widgets) { // Set the content type for the all apps/widgets space @@ -3538,15 +3535,19 @@ public class Launcher extends Activity } }); + dispatchOnLauncherTransitionPrepare(fromView, animated, false); + dispatchOnLauncherTransitionPrepare(toView, animated, false); + + // Shrink workspaces away if going to AppsCustomize from workspace + Animator workspaceAnim = + mWorkspace.getChangeStateAnimation(Workspace.State.SMALL, animated); + if (workspaceAnim != null) { mStateAnimation.play(workspaceAnim); } boolean delayAnim = 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 if ((((LauncherTransitionable) toView).getContent().getMeasuredWidth() == 0) || -- cgit v1.2.3