Extracting search algorithm in an interface to make it easier to change the search behavior

Change-Id: I0b1d1387c78d13ef749aac39d5c8167c2909716a
This commit is contained in:
Sunny Goyal
2017-06-14 10:30:54 -07:00
parent 7847d10f38
commit f6eb789016
4 changed files with 43 additions and 27 deletions

View File

@@ -118,8 +118,8 @@ public class AppsSearchContainerLayout extends FrameLayout
mAppsRecyclerView = recyclerView;
mAppsRecyclerView.addOnScrollListener(mElevationController);
mAdapter = (AllAppsGridAdapter) mAppsRecyclerView.getAdapter();
mSearchBarController.initialize(appsList, mSearchInput, mLauncher, this);
mSearchBarController.initialize(
new DefaultAppSearchAlgorithm(appsList.getApps()), mSearchInput, mLauncher, this);
}
@Override