Limit the suggestions to be shown to 5.
- when creating the dashboard data, pass the sublist of suggestions to cap the total number of suggestions to be shown to 5. - if user swipe away the suggestion, it will only remove the suggestion from the suggestion adapater, and will not trigger rebuilding the whole UI. Bug: 64072051 Change-Id: I1efabeb2a805c670007c631d3ccb0fdfbde7b55a Fix: 63309218 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -251,10 +251,7 @@ public class DashboardSummary extends InstrumentedFragment
|
||||
|
||||
@Override
|
||||
public void onSuggestionDismissed(Tile suggestion) {
|
||||
mAdapter.onSuggestionDismissed();
|
||||
// Refresh the UI to pick up suggestions that can now be shown because, say, a higher
|
||||
// priority suggestion has been dismissed, or an exclusive suggestion category is emptied.
|
||||
rebuildUI();
|
||||
mAdapter.onSuggestionDismissed(suggestion);
|
||||
}
|
||||
|
||||
private class SuggestionLoader extends AsyncTask<Void, Void, List<Tile>> {
|
||||
|
Reference in New Issue
Block a user