From 2494c3f1681e71af06556ef47de16f018811f7e3 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 3 Mar 2016 11:35:59 -0800 Subject: [PATCH] Moving createMarketSearchIntent to search controller to allow it to be customizable Change-Id: I3a05abf7c0357a2f92c8a3fa2dc223f9eacc221e --- .../launcher3/allapps/AllAppsContainerView.java | 2 +- .../launcher3/allapps/AllAppsGridAdapter.java | 89 +++++++++------------- .../allapps/AllAppsSearchBarController.java | 32 ++++---- 3 files changed, 50 insertions(+), 73 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 016381ff9..c12f645e3 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -229,6 +229,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc } mSearchBarController = searchController; mSearchBarController.initialize(mApps, mSearchInput, mLauncher, this); + mAdapter.setSearchController(mSearchBarController); updateBackgroundAndPaddings(); } @@ -261,7 +262,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc @Override protected void onFinishInflate() { super.onFinishInflate(); - mAdapter.setRtl(Utilities.isRtl(getResources())); // This is a focus listener that proxies focus from a view into the list view. This is to // work around the search box from getting first focus and showing the cursor. diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java index 1b6f21bcd..d41224a2d 100644 --- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java +++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java @@ -324,20 +324,29 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter