Adding listener support for color extraction changes

Changing the apps-search layout to use theme attribute instead of hard
coded layout id

Bug: 37616877
Change-Id: Iae601758303f83a2774635f0d88f74d99fc643c3
This commit is contained in:
Sunny Goyal
2017-05-09 12:40:11 -07:00
parent 161f96bc77
commit 60820d796f
10 changed files with 46 additions and 22 deletions

View File

@@ -195,6 +195,8 @@ public class AlphabeticalAppsList {
private int mNumPredictedAppsPerRow;
private int mNumAppRowsInAdapter;
private boolean mHasSearchDivider = true;
public AlphabeticalAppsList(Context context) {
mLauncher = Launcher.getLauncher(context);
mIndexer = new AlphabeticIndexCompat(context);
@@ -343,6 +345,10 @@ public class AlphabeticalAppsList {
onAppsUpdated();
}
public void disableSearchDivider() {
mHasSearchDivider = false;
}
/**
* Updates internals when the set of apps are updated.
*/
@@ -429,8 +435,10 @@ public class AlphabeticalAppsList {
}
}
// Add the search divider
mAdapterItems.add(AdapterItem.asSearchDivider(position++));
if (mHasSearchDivider) {
// Add the search divider
mAdapterItems.add(AdapterItem.asSearchDivider(position++));
}
// Process the predicted app components
mPredictedApps.clear();