diff options
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizeTabHost.java')
-rw-r--r-- | src/com/android/launcher3/AppsCustomizeTabHost.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AppsCustomizeTabHost.java b/src/com/android/launcher3/AppsCustomizeTabHost.java index 9868e8ba5..71219cd57 100644 --- a/src/com/android/launcher3/AppsCustomizeTabHost.java +++ b/src/com/android/launcher3/AppsCustomizeTabHost.java @@ -79,6 +79,9 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona setOnTabChangedListener(this); } + void selectAppsTab() { + setContentTypeImmediate(AppsCustomizePagedView.ContentType.Applications); + } void selectWidgetsTab() { setContentTypeImmediate(AppsCustomizePagedView.ContentType.Widgets); } @@ -117,6 +120,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false); tabView.setText(label); tabView.setContentDescription(label); + addTab(newTabSpec(APPS_TAB_TAG).setIndicator(tabView).setContent(contentFactory)); label = getContext().getString(R.string.widgets_tab_label); tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false); tabView.setText(label); @@ -232,8 +236,8 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona // add the pages to mAnimationBuffer in reverse order to match that behavior for (int i = visiblePages.size() - 1; i >= 0; i--) { View child = visiblePages.get(i); - if (child instanceof PagedViewCellLayout) { - ((PagedViewCellLayout) child).resetChildrenOnKeyListeners(); + if (child instanceof AppsCustomizeCellLayout) { + ((AppsCustomizeCellLayout) child).resetChildrenOnKeyListeners(); } else if (child instanceof PagedViewGridLayout) { ((PagedViewGridLayout) child).resetChildrenOnKeyListeners(); } |