diff options
author | Michael Jurka <mikejurka@google.com> | 2011-01-16 18:43:58 -0800 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-01-16 18:44:19 -0800 |
commit | 6c7a03a858d6a695d0f6005398cc6f9b3e7dd18d (patch) | |
tree | d4ae0f2442d13099605ed43262207bd3bd888693 /src/com/android/launcher2/AllAppsTabbed.java | |
parent | b7e0e88412871f6582420e3eeb1552598ba8a4c1 (diff) | |
download | android_packages_apps_Trebuchet-6c7a03a858d6a695d0f6005398cc6f9b3e7dd18d.tar.gz android_packages_apps_Trebuchet-6c7a03a858d6a695d0f6005398cc6f9b3e7dd18d.tar.bz2 android_packages_apps_Trebuchet-6c7a03a858d6a695d0f6005398cc6f9b3e7dd18d.zip |
Fixed bug where All Apps would appear to animate from the right
Diffstat (limited to 'src/com/android/launcher2/AllAppsTabbed.java')
-rw-r--r-- | src/com/android/launcher2/AllAppsTabbed.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java index 2cc0a6bb2..47a5bf7fc 100644 --- a/src/com/android/launcher2/AllAppsTabbed.java +++ b/src/com/android/launcher2/AllAppsTabbed.java @@ -48,6 +48,7 @@ public class AllAppsTabbed extends TabHost implements AllAppsView { private AllAppsPagedView mAllApps; private Context mContext; private final LayoutInflater mInflater; + private boolean mFirstLayout = true; public AllAppsTabbed(Context context, AttributeSet attrs) { super(context, attrs); @@ -135,6 +136,11 @@ public class AllAppsTabbed extends TabHost implements AllAppsView { @Override public void setVisibility(int visibility) { + if (visibility == View.GONE && mFirstLayout) { + // It needs to be INVISIBLE so that it will be measured in the layout. + // Otherwise the animations is messed up when we show it for the first time. + visibility = View.INVISIBLE; + } final boolean isVisible = (visibility == View.VISIBLE); super.setVisibility(visibility); float zoom = (isVisible ? 1.0f : 0.0f); @@ -147,6 +153,12 @@ public class AllAppsTabbed extends TabHost implements AllAppsView { } @Override + protected void onLayout(boolean changed, int l, int t, int r, int b) { + mFirstLayout = false; + super.onLayout(changed, l, t, r, b); + } + + @Override public boolean isAnimating() { return (getAnimation() != null); } |