isOpaque is not appropriate for AllAppsTabbed; replace with isAnimating().
This commit is contained in:
parent
13f011e352
commit
ff5f040de1
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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<ApplicationInfo> list) {
|
||||
mAllApps2D.setApps(list);
|
||||
|
|
|
@ -31,7 +31,7 @@ public interface AllAppsView {
|
|||
|
||||
public boolean isVisible();
|
||||
|
||||
public boolean isOpaque();
|
||||
public boolean isAnimating();
|
||||
|
||||
public void setApps(ArrayList<ApplicationInfo> list);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue