summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-09-03 11:38:43 -0700
committerJoe Onorato <joeo@android.com>2009-09-03 11:38:43 -0700
commit006b25f88d56ef59c78f376fa2b07a34a2cef6e3 (patch)
tree386f76e68c813b5ff3bfa57559bbe921f523e495 /src
parentfc75f0f5328820d4dda0adcbdb83ff3c907d74c6 (diff)
downloadandroid_packages_apps_Trebuchet-006b25f88d56ef59c78f376fa2b07a34a2cef6e3.tar.gz
android_packages_apps_Trebuchet-006b25f88d56ef59c78f376fa2b07a34a2cef6e3.tar.bz2
android_packages_apps_Trebuchet-006b25f88d56ef59c78f376fa2b07a34a2cef6e3.zip
Always have the AllAppsView visible, but have it draw nothing
when it shouldn't be visible. This lets us do clean animations and not wait for GL to spool up.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AllAppsView.java13
-rw-r--r--src/com/android/launcher2/Launcher.java9
2 files changed, 15 insertions, 7 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 375fc12c7..9967332de 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -282,6 +282,18 @@ public class AllAppsView extends RSSurfaceView
public void onDropCompleted(View target, boolean success) {
}
+ public void show() {
+ mRollo.mState.read();
+ mRollo.mState.visible = 1;
+ mRollo.mState.save();
+ }
+
+ public void hide(boolean animate) {
+ mRollo.mState.read();
+ mRollo.mState.visible = 0;
+ mRollo.mState.save();
+ }
+
/*
private TouchHandler mScrollHandler = new TouchHandler() {
@Override
@@ -409,6 +421,7 @@ public class AllAppsView extends RSSurfaceView
@AllocationIndex(8) public int startScrollX;
@AllocationIndex(9) public int selectedIconIndex = -1;
@AllocationIndex(10) public int selectedIconTexture;
+ @AllocationIndex(11) public int visible;
}
public RolloRS() {
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 06f106ec1..9bcb53788 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1583,7 +1583,7 @@ public final class Launcher extends Activity
void showAllAppsDialog() {
mAllAppsVisible = true;
- mAllAppsGrid.setVisibility(View.VISIBLE);
+ mAllAppsGrid.show();
mWorkspace.hide();
// TODO: fade these two too
@@ -1594,12 +1594,7 @@ public final class Launcher extends Activity
void closeAllAppsDialog(boolean animated) {
if (mAllAppsVisible) {
Log.d(LOG_TAG, "closing all apps");
- if (animated) {
- // TODO mDrawer.animateClose();
- mAllAppsGrid.setVisibility(View.GONE);
- } else {
- mAllAppsGrid.setVisibility(View.GONE);
- }
+ mAllAppsGrid.hide(animated);
mAllAppsVisible = false;
mWorkspace.getChildAt(mWorkspace.getCurrentScreen()).requestFocus();
mWorkspace.show();