diff --git a/src/com/android/launcher2/AllApps2D.java b/src/com/android/launcher2/AllApps2D.java index b993364bf9..7d0970b0ae 100644 --- a/src/com/android/launcher2/AllApps2D.java +++ b/src/com/android/launcher2/AllApps2D.java @@ -68,8 +68,6 @@ public class AllApps2D private AppsAdapter mAppsAdapter; - private boolean mIsViewOpaque; - // ------------------------------------------------------------ public static class HomeButton extends ImageButton { @@ -128,8 +126,6 @@ public class AllApps2D @Override protected void onFinishInflate() { - mIsViewOpaque = super.isOpaque(); - try { mGrid = (GridView)findViewWithTag("all_apps_2d_grid"); if (mGrid == null) throw new Resources.NotFoundException(); @@ -252,9 +248,8 @@ public class AllApps2D return mZoom > 0.001f; } - @Override - public boolean isOpaque() { - return mIsViewOpaque && mZoom > 0.999f; + public boolean isAnimating() { + return (getAnimation() != null); } public void setApps(ArrayList list) { diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java index bb18870dc2..653f355938 100644 --- a/src/com/android/launcher2/AllApps3D.java +++ b/src/com/android/launcher2/AllApps3D.java @@ -787,8 +787,8 @@ public class AllApps3D extends RSSurfaceView return sRollo != null && mZoom > 0.001f; } - public boolean isOpaque() { - return mZoom > 0.999f; + public boolean isAnimating() { + return isVisible() && mZoom <= 0.999f; } public void setApps(ArrayList list) { diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java index 67293d9154..7f6f63f97d 100644 --- a/src/com/android/launcher2/AllAppsTabbed.java +++ b/src/com/android/launcher2/AllAppsTabbed.java @@ -91,6 +91,11 @@ public class AllAppsTabbed extends TabHost implements AllAppsView { return mAllApps2D.isVisible(); } + @Override + public boolean isAnimating() { + return (getAnimation() != null); + } + @Override public void setApps(ArrayList list) { mAllApps2D.setApps(list); diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java index 877c07577c..007ecf8d6f 100644 --- a/src/com/android/launcher2/AllAppsView.java +++ b/src/com/android/launcher2/AllAppsView.java @@ -31,7 +31,7 @@ public interface AllAppsView { public boolean isVisible(); - public boolean isOpaque(); + public boolean isAnimating(); public void setApps(ArrayList list); diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index f846b516c3..37e7191b86 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -218,7 +218,6 @@ public final class Launcher extends Activity private Drawable[] mHotseatIcons = null; private CharSequence[] mHotseatLabels = null; - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -1205,12 +1204,12 @@ public final class Launcher extends Activity // If all apps is animating, don't show the menu, because we don't know // which one to show. - if (mAllAppsGrid.isVisible() && !mAllAppsGrid.isOpaque()) { + if (mAllAppsGrid.isAnimating()) { return false; } // Only show the add and wallpaper options when we're not in all apps. - boolean visible = !mAllAppsGrid.isOpaque(); + boolean visible = !mAllAppsGrid.isVisible(); menu.setGroupVisible(MENU_GROUP_ADD, visible); menu.setGroupVisible(MENU_GROUP_WALLPAPER, visible);