Fixing bugs related to starting in All Apps mode
- fixed bug where Workspace.shrinkToBottom() was
not always called in showAllApps
- added logic to defer call to
Workspace.shrinkToBottom() after first layout
call (necessary because shrinkToBottom relies
on getWidth() working properly)
- added ability to Workspace.shrinkToBottom()
without animation
Change-Id: I966141a60b6b014cf97e83b4d45725b41b16e55d
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 1de318f..feb247e 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2032,12 +2032,14 @@
void showAllApps(boolean animated) {
hideCustomizationDrawer();
+ if (LauncherApplication.isScreenXLarge()) {
+ mWorkspace.shrinkToBottom(animated);
+ }
if (LauncherApplication.isScreenXLarge() && animated) {
// Not really a zoom -- this just makes the view visible
mAllAppsGrid.zoom(1.0f, false);
Animation anim = AnimationUtils.loadAnimation(this, R.anim.all_apps_zoom_in);
((View) mAllAppsGrid).startAnimation(anim);
- mWorkspace.shrinkToBottom();
} else {
mAllAppsGrid.zoom(1.0f, animated);
}