Reduce max suggestion to show to 2.
- since we now either have 1 or 2 suggestions, putting most layout configuration in the xml instead of dynamically setting it in code. - remove the suggestion header - vertical center align the suggestion title text for 2 cards to make the card with single line looks better. - tint all suggestions icons. Change-Id: I0130f15d530264e164e5afd7c091f165a4a6adc2 Fixes: 70573674 Fixes: 73293989 Fixes: 64986736 Test: visual and make RunSettingsRoboTests
This commit is contained in:
@@ -304,14 +304,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
// header anymore.
|
||||
final List<Suggestion> suggestions =
|
||||
(List<Suggestion>) mDashboardData.getItemEntityByPosition(position);
|
||||
final int suggestionCount = suggestions.size();
|
||||
final Typeface fontMedium = Typeface.create(
|
||||
mContext.getString(com.android.internal.R.string.config_headlineFontFamilyMedium),
|
||||
Typeface.NORMAL);
|
||||
holder.title.setTypeface(fontMedium);
|
||||
if (suggestions != null && suggestionCount > 0) {
|
||||
holder.summary.setText("" + suggestionCount);
|
||||
holder.summary.setTypeface(fontMedium);
|
||||
if (suggestions != null && suggestions.size() > 0) {
|
||||
mSuggestionAdapter.setSuggestions(suggestions);
|
||||
holder.data.setAdapter(mSuggestionAdapter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user