summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2010-07-26 22:23:26 (GMT)
committerPatrick Dubroy <dubroy@google.com>2010-07-26 22:23:42 (GMT)
commitff5f040de1fd7a33759e8e4ce03c3ef68df174bb (patch)
tree5e9ca7d9db701272018802110eab865a48edeba6 /src
parent13f011e35299ed071ecfeb3573a95ddbae5285d3 (diff)
downloadandroid_packages_apps_Trebuchet-ff5f040de1fd7a33759e8e4ce03c3ef68df174bb.zip
android_packages_apps_Trebuchet-ff5f040de1fd7a33759e8e4ce03c3ef68df174bb.tar.gz
android_packages_apps_Trebuchet-ff5f040de1fd7a33759e8e4ce03c3ef68df174bb.tar.bz2
isOpaque is not appropriate for AllAppsTabbed; replace with isAnimating().
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AllApps2D.java9
-rw-r--r--src/com/android/launcher2/AllApps3D.java4
-rw-r--r--src/com/android/launcher2/AllAppsTabbed.java5
-rw-r--r--src/com/android/launcher2/AllAppsView.java2
-rw-r--r--src/com/android/launcher2/Launcher.java5
5 files changed, 12 insertions, 13 deletions
diff --git a/src/com/android/launcher2/AllApps2D.java b/src/com/android/launcher2/AllApps2D.java
index b993364..7d0970b 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<ApplicationInfo> list) {
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index bb18870..653f355 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<ApplicationInfo> list) {
diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java
index 67293d9..7f6f63f 100644
--- a/src/com/android/launcher2/AllAppsTabbed.java
+++ b/src/com/android/launcher2/AllAppsTabbed.java
@@ -92,6 +92,11 @@ public class AllAppsTabbed extends TabHost implements AllAppsView {
}
@Override
+ public boolean isAnimating() {
+ return (getAnimation() != null);
+ }
+
+ @Override
public void setApps(ArrayList<ApplicationInfo> list) {
mAllApps2D.setApps(list);
}
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 877c075..007ecf8 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<ApplicationInfo> list);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index f846b51..37e7191 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);