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:
Doris Ling
2018-01-31 15:05:21 -08:00
parent b832f737c3
commit 7fa083ece9
9 changed files with 26 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.dashboard.suggestions;
import android.app.PendingIntent;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.Bundle;
@@ -122,6 +123,9 @@ public class SuggestionAdapter extends RecyclerView.Adapter<DashboardItemHolder>
holder.icon.setImageDrawable(drawable);
holder.title.setText(suggestion.getTitle());
holder.title.setSingleLine(suggestionCount == 1);
holder.title.setTypeface(Typeface.create(
mContext.getString(com.android.internal.R.string.config_headlineFontFamilyMedium),
Typeface.NORMAL));
if (suggestionCount == 1) {
final CharSequence summary = suggestion.getSummary();