diff options
author | cretin45 <cretin45@gmail.com> | 2015-11-30 16:38:47 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2015-12-03 16:44:28 -0800 |
commit | ecfa0ff337cf2feae19e651470c1ca05926430f2 (patch) | |
tree | 3ed466a564f64ba259b9ec50b72e79bb27e87263 /src/com/android/launcher3/Launcher.java | |
parent | 4cc0018c15a8cf2ab58f00929de6a5bd034ddb86 (diff) | |
download | android_packages_apps_Trebuchet-ecfa0ff337cf2feae19e651470c1ca05926430f2.tar.gz android_packages_apps_Trebuchet-ecfa0ff337cf2feae19e651470c1ca05926430f2.tar.bz2 android_packages_apps_Trebuchet-ecfa0ff337cf2feae19e651470c1ca05926430f2.zip |
Trebuchet: Add app drawer settings
Change-Id: I040420608de64bedc6e9832268796cdf801f5c21
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 8f3bbf578..fd6ab26e4 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1551,11 +1551,6 @@ public class Launcher extends Activity mAppsView.setSearchBarController(mAppsView.newDefaultAppSearchController()); } - mAppsView.setUseScrubber(mUseScrubber); - mAppsView.setSectionStrategy(AllAppsContainerView.SECTION_STRATEGY_RAGGED); - mAppsView.setGridTheme(AllAppsContainerView.GRID_THEME_DARK); - mWidgetsView.setUseScrubber(false); - // Setup the drag controller (drop targets have to be added in reverse order in priority) dragController.setDragScoller(mWorkspace); dragController.setScrollView(mDragLayer); @@ -1832,6 +1827,23 @@ public class Launcher extends Activity mAppsView.reset(); } + public void reloadAppDrawer() { + List<AppInfo> addedApps = mAppsView.getApps(); + mDragLayer.removeView(mAppsView); + mAppsView = (AllAppsContainerView)LayoutInflater + .from(this).inflate(R.layout.all_apps, mDragLayer, false); + mDragLayer.addView(mAppsView, mDragLayer.getChildCount() - 1); + mAppsView.setVisibility(View.INVISIBLE); + if (mLauncherCallbacks != null && mLauncherCallbacks.getAllAppsSearchBarController() != null) { + mAppsView.setSearchBarController(mLauncherCallbacks.getAllAppsSearchBarController()); + } else { + mAppsView.setSearchBarController(mAppsView.newDefaultAppSearchController()); + } + mAppsView.addApps(addedApps); + tryAndUpdatePredictedApps(); + mAppsView.reset(); + } + /** * Replaces currently added fragments in the launcher layout with a * {@link DynamicGridSizeFragment}. |