Update suggestion UI
- reduce space above and below the suggestion header - reduce space around the suggestion cardview - set the font family for the suggestion header and title. Change-Id: Ief6247005f1e69fe5025af60f3c9627d357d94a4 Fixes: 72710227 Test: visual
This commit is contained in:
@@ -17,6 +17,7 @@ package com.android.settings.dashboard;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Bundle;
|
||||
@@ -303,8 +304,13 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
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);
|
||||
mSuggestionAdapter.setSuggestions(suggestions);
|
||||
holder.data.setAdapter(mSuggestionAdapter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user