Bind icon and remote views for Suggestion
Bug: 65065268 Test: robotests Change-Id: I181a9e092c56f4e45addfc1cde166fb7dac7becd
This commit is contained in:
@@ -601,6 +601,9 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
}
|
||||
|
||||
public Drawable getIcon(Icon icon) {
|
||||
if (icon == null) {
|
||||
return null;
|
||||
}
|
||||
Drawable drawable = mMap.get(icon);
|
||||
if (drawable == null) {
|
||||
drawable = icon.loadDrawable(mContext);
|
||||
|
@@ -96,8 +96,7 @@ public class SuggestionAdapter extends RecyclerView.Adapter<DashboardItemHolder>
|
||||
// itemView));
|
||||
// } else
|
||||
{
|
||||
// TODO: Add icon field in Suggestion, and enable this.
|
||||
// holder.icon.setImageDrawable(mCache.getIcon(suggestion.icon));
|
||||
holder.icon.setImageDrawable(mCache.getIcon(suggestion.getIcon()));
|
||||
holder.title.setText(suggestion.getTitle());
|
||||
final CharSequence summary = suggestion.getSummary();
|
||||
if (!TextUtils.isEmpty(summary)) {
|
||||
|
Reference in New Issue
Block a user