summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AppsCustomizeTabHost.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-08-09 16:02:43 -0700
committerWinson Chung <winsonc@google.com>2011-08-09 17:03:37 -0700
commitc100e8eae7d67ad5bd78767494b62b8fae5d1779 (patch)
treeacbd16ac61e8fa5d4256b01054d323a54a318948 /src/com/android/launcher2/AppsCustomizeTabHost.java
parentfa2b241424f3478200e77d61db83448c2f211fee (diff)
downloadandroid_packages_apps_Trebuchet-c100e8eae7d67ad5bd78767494b62b8fae5d1779.tar.gz
android_packages_apps_Trebuchet-c100e8eae7d67ad5bd78767494b62b8fae5d1779.tar.bz2
android_packages_apps_Trebuchet-c100e8eae7d67ad5bd78767494b62b8fae5d1779.zip
Tablet/AllApps fixes.
- Fixing regression where the power button did not dismiss Apps/Customize - Fixing regression in number of icons in portrain in AC, and removing legacy peek var for calculations (5122724) - Fixing spacing in shop button on tablet - Fixing bug where the apps pane was being changed as we were animating (5139543) Change-Id: I3a3e5f224fd92e99072c830d13423d195179e7c7
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizeTabHost.java')
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 25001b19a..8f067faa5 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -45,6 +45,9 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
private ViewGroup mTabsContainer;
private AppsCustomizePagedView mAppsCustomizePane;
+ private boolean mInTransition;
+ private boolean mResetAfterTransition;
+
public AppsCustomizeTabHost(Context context, AttributeSet attrs) {
super(context, attrs);
mLayoutInflater = LayoutInflater.from(context);
@@ -223,9 +226,20 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
return super.getDescendantFocusability();
}
+ void reset() {
+ if (mInTransition) {
+ // Defer to after the transition to reset
+ mResetAfterTransition = true;
+ } else {
+ // Reset immediately
+ mAppsCustomizePane.reset();
+ }
+ }
+
/* LauncherTransitionable overrides */
@Override
public void onLauncherTransitionStart(Animator animation, boolean toWorkspace) {
+ mInTransition = true;
// isHardwareAccelerated() checks if we're attached to a window and if that
// window is HW accelerated-- we were sometimes not attached to a window
// and buildLayer was throwing an IllegalStateException
@@ -240,10 +254,15 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
if (!toWorkspace && !LauncherApplication.isScreenLarge()) {
mAppsCustomizePane.showScrollingIndicator(false);
}
+ if (mResetAfterTransition) {
+ mAppsCustomizePane.reset();
+ mResetAfterTransition = false;
+ }
}
@Override
public void onLauncherTransitionEnd(Animator animation, boolean toWorkspace) {
+ mInTransition = false;
if (animation != null) {
setLayerType(LAYER_TYPE_NONE, null);
}