summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java22
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}.