diff options
author | Winson Chung <winsonc@google.com> | 2013-09-03 17:48:37 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-09-05 12:14:28 -0700 |
commit | c58497ee619416c4949b16eb43486c11618b69e5 (patch) | |
tree | b8bfd3ec331885a25f42c69fb41dbfd861a4763a /src/com/android/launcher3/AppsCustomizeTabHost.java | |
parent | 2d8de5845be5f49d3767b8354f0d5479a0715abe (diff) | |
download | android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.gz android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.bz2 android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.zip |
Initial changes to restore AllApps.
- Removes unused all apps code due to dynamic grid/spacing
- Attempts to use CellLayout instead of PagedViewCellLayout
Change-Id: I3c49bca9fc35dfeaf250591fd63bc7f36119968f
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(); } |