diff options
author | Winson Chung <winsonc@google.com> | 2012-05-16 17:02:20 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-05-16 17:02:34 -0700 |
commit | c7d2b60ab1db9a478f173d045b9f501d994eb8b1 (patch) | |
tree | 8e364c9dc3ff9b2b1aaa39de7012fd1d63d62ba1 /src/com/android/launcher2/Launcher.java | |
parent | 9218d8118926eaafe010daa222b6b0f19ce5ab66 (diff) | |
download | android_packages_apps_Trebuchet-c7d2b60ab1db9a478f173d045b9f501d994eb8b1.tar.gz android_packages_apps_Trebuchet-c7d2b60ab1db9a478f173d045b9f501d994eb8b1.tar.bz2 android_packages_apps_Trebuchet-c7d2b60ab1db9a478f173d045b9f501d994eb8b1.zip |
Updating search bar animation, and adding use of hw layers.
Change-Id: Ida06bb526876abc793366415df1e06f483f3b66c
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 2e7caff3d..84fb9d066 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -2368,6 +2368,9 @@ public final class Launcher extends Activity if (!animationCancelled) { updateWallpaperVisibility(false); } + + // Hide the search bar + mSearchDropTargetBar.hideSearchBar(false); } @Override @@ -2436,6 +2439,9 @@ public final class Launcher extends Activity // Hide the workspace scrollbar mWorkspace.hideScrollingIndicator(true); hideDockDivider(); + + // Hide the search bar + mSearchDropTargetBar.hideSearchBar(false); } dispatchOnLauncherTransitionPrepare(fromView, animated, false); dispatchOnLauncherTransitionStart(fromView, animated, false); @@ -2569,13 +2575,16 @@ public final class Launcher extends Activity void showWorkspace(boolean animated, Runnable onCompleteRunnable) { if (mState != State.WORKSPACE) { + boolean wasInSpringLoadedMode = (mState == State.APPS_CUSTOMIZE_SPRING_LOADED); mWorkspace.setVisibility(View.VISIBLE); hideAppsCustomizeHelper(State.WORKSPACE, animated, false, onCompleteRunnable); - // Show the search bar and hotseat - mSearchDropTargetBar.showSearchBar(animated); + // Show the search bar (only animate if we were showing the drop target bar in spring + // loaded mode) + mSearchDropTargetBar.showSearchBar(wasInSpringLoadedMode); + // We only need to animate in the dock divider if we're going from spring loaded mode - showDockDivider(animated && mState == State.APPS_CUSTOMIZE_SPRING_LOADED); + showDockDivider(animated && wasInSpringLoadedMode); // Set focus to the AppsCustomize button if (mAllAppsButton != null) { @@ -2602,9 +2611,6 @@ public final class Launcher extends Activity showAppsCustomizeHelper(animated, false); mAppsCustomizeTabHost.requestFocus(); - // Hide the search bar and hotseat - mSearchDropTargetBar.hideSearchBar(animated); - // Change the state *after* we've called all the transition code mState = State.APPS_CUSTOMIZE; @@ -2637,7 +2643,6 @@ public final class Launcher extends Activity // exitSpringLoadedDragMode made it visible. This is a bit hacky; we should // clean up our state transition functions mAppsCustomizeTabHost.setVisibility(View.GONE); - mSearchDropTargetBar.showSearchBar(true); showWorkspace(true, onCompleteRunnable); } else { exitSpringLoadedDragMode(); |