Fix layout height for suggestion tile.

- set minHeight instead of using a fix height, so that when the
font/display size is set to larger, the height will expand accordingly
to fit all elements in the suggestion card.

- revert the change that tint all suggestion icons. The previous logic
should be used to determine if we should tint the icon or not.

Change-Id: I2451490130cee216ff65301a600eb91d2e65c321
Fixes: 74261827
Test: visual and make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-03-07 15:04:11 -08:00
parent d9eba6b856
commit 8f5773b834
4 changed files with 34 additions and 4 deletions

View File

@@ -119,7 +119,7 @@ public class SuggestionAdapter extends RecyclerView.Adapter<DashboardItemHolder>
}
final Icon icon = suggestion.getIcon();
final Drawable drawable = mCache.getIcon(icon);
if (drawable != null) {
if (drawable != null && (suggestion.getFlags() & Suggestion.FLAG_ICON_TINTABLE) != 0) {
drawable.setTint(Utils.getColorAccent(mContext));
}
holder.icon.setImageDrawable(drawable);