summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-07-25 23:05:33 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-07-25 23:05:33 -0700
commit281bcdb98db1ccd14e0e175f193af927de3d528d (patch)
tree365346b4c877d12cf28507fb6c538bf130e4effe
parent80e055ee81173b554b19d6c8076d602668648445 (diff)
parent59fe4f1023267f48cd89b132f2c5d6741028bbaf (diff)
downloadandroid_packages_apps_Trebuchet-281bcdb98db1ccd14e0e175f193af927de3d528d.tar.gz
android_packages_apps_Trebuchet-281bcdb98db1ccd14e0e175f193af927de3d528d.tar.bz2
android_packages_apps_Trebuchet-281bcdb98db1ccd14e0e175f193af927de3d528d.zip
am 59fe4f10: am 8e1b4f65: am fa4086dd: Fixing issue where selected tab did not match AllApps page upon rotation.
* commit '59fe4f1023267f48cd89b132f2c5d6741028bbaf': Fixing issue where selected tab did not match AllApps page upon rotation.
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 27845bfac..5b33c3168 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -48,7 +48,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;
@@ -75,16 +74,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);
}
/**
@@ -201,10 +201,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();
@@ -295,8 +291,9 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
}
public void setCurrentTabFromContent(AppsCustomizePagedView.ContentType type) {
- mSuppressContentCallback = true;
+ setOnTabChangedListener(null);
setCurrentTabByTag(getTabTagForContentType(type));
+ setOnTabChangedListener(this);
}
/**