diff options
author | Winson Chung <winsonc@google.com> | 2012-07-25 21:47:56 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-07-25 21:47:56 -0700 |
commit | 8e1b4f65383d859ca7e2ebfc9a9463c8d46271de (patch) | |
tree | fc6ad753a7beab94b4a01a2f14a1754cb814c18d | |
parent | b8da744b1b7aa0fb1cded734618b788af2b8911f (diff) | |
parent | fa4086ddd7ab9dd98e3ffef798a655ec07e37e14 (diff) | |
download | android_packages_apps_Trebuchet-8e1b4f65383d859ca7e2ebfc9a9463c8d46271de.tar.gz android_packages_apps_Trebuchet-8e1b4f65383d859ca7e2ebfc9a9463c8d46271de.tar.bz2 android_packages_apps_Trebuchet-8e1b4f65383d859ca7e2ebfc9a9463c8d46271de.zip |
am fa4086dd: Fixing issue where selected tab did not match AllApps page upon rotation.
* commit 'fa4086ddd7ab9dd98e3ffef798a655ec07e37e14':
Fixing issue where selected tab did not match AllApps page upon rotation.
-rw-r--r-- | src/com/android/launcher2/AppsCustomizeTabHost.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java index c88b5a24a..144aad98f 100644 --- a/src/com/android/launcher2/AppsCustomizeTabHost.java +++ b/src/com/android/launcher2/AppsCustomizeTabHost.java @@ -49,7 +49,6 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona private ViewGroup mTabs; private ViewGroup mTabsContainer; private AppsCustomizePagedView mAppsCustomizePane; - private boolean mSuppressContentCallback = false; private FrameLayout mAnimationBuffer; private LinearLayout mContent; @@ -82,16 +81,17 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona * tabs manually). */ void setContentTypeImmediate(AppsCustomizePagedView.ContentType type) { + setOnTabChangedListener(null); onTabChangedStart(); onTabChangedEnd(type); + setCurrentTabByTag(getTabTagForContentType(type)); + setOnTabChangedListener(this); } void selectAppsTab() { setContentTypeImmediate(AppsCustomizePagedView.ContentType.Applications); - setCurrentTabByTag(APPS_TAB_TAG); } void selectWidgetsTab() { setContentTypeImmediate(AppsCustomizePagedView.ContentType.Widgets); - setCurrentTabByTag(WIDGETS_TAB_TAG); } /** @@ -208,10 +208,6 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona @Override public void onTabChanged(String tabId) { final AppsCustomizePagedView.ContentType type = getContentTypeForTabTag(tabId); - if (mSuppressContentCallback) { - mSuppressContentCallback = false; - return; - } // Animate the changing of the tab content by fading pages in and out final Resources res = getResources(); @@ -302,8 +298,9 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona } public void setCurrentTabFromContent(AppsCustomizePagedView.ContentType type) { - mSuppressContentCallback = true; + setOnTabChangedListener(null); setCurrentTabByTag(getTabTagForContentType(type)); + setOnTabChangedListener(this); } /** |