[Phase 3 Review] Update theme preview
- Uses body font for app label
- Set smart space text size from 16sp to 18sp
- Screenshot:
https://screenshot.googleplex.com/hvn5CqH4NvS.png
https://screenshot.googleplex.com/dppO75cR2FF.png (largest case)
Test: Manually
Fixes: 158625121
Change-Id: I00dadf1a796676b74fb8e4f53258509567b20b07
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4f78920..1c6242e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -76,10 +76,10 @@
<dimen name="preview_theme_topbar_container_margin_horizontal">16dp</dimen>
<dimen name="preview_theme_color_icons_container_margin_horizontal">10dp</dimen>
<dimen name="preview_theme_qsb_container_margin_horizontal">14dp</dimen>
- <dimen name="preview_theme_smart_space_date_size">16sp</dimen>
+ <dimen name="preview_theme_smart_space_date_size">18sp</dimen>
<dimen name="preview_theme_app_icon_size">64dp</dimen>
<dimen name="preview_theme_app_icon_shape_text_margin_top">8dp</dimen>
- <dimen name="preview_theme_app_icon_shape_text_size">14sp</dimen>
+ <dimen name="preview_theme_app_icon_shape_text_size">16sp</dimen>
<dimen name="preview_theme_color_icons_padding_top">12dp</dimen>
<dimen name="preview_theme_color_icons_padding_bottom">20dp</dimen>
<dimen name="preview_theme_color_icons_padding_horizontal">18dp</dimen>
diff --git a/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java b/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java
index 1f99c1e..ec98601 100644
--- a/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java
+++ b/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java
@@ -160,6 +160,7 @@
/** Loads the Theme option preview into the container view. */
public void setPreviewInfo(PreviewInfo previewInfo) {
setHeadlineFont(previewInfo.headlineFontFamily);
+ setBodyFont(previewInfo.bodyFontFamily);
setTopBarIcons(previewInfo.icons);
setAppIconShape(previewInfo.shapeAppIcons);
setColorAndIconsSection(previewInfo.icons, previewInfo.shapeDrawable,
@@ -252,17 +253,19 @@
mStatusBarClock.setTypeface(headlineFont);
mSmartSpaceDate.setTypeface(headlineFont);
- // Update font of app names.
- for (int id : mShapeIconAppNameIds) {
- TextView appName = mContentView.findViewById(id);
- appName.setTypeface(headlineFont);
- }
-
// Update font of color/icons section title.
TextView colorIconsSectionTitle = mContentView.findViewById(R.id.color_icons_section_title);
colorIconsSectionTitle.setTypeface(headlineFont);
}
+ private void setBodyFont(Typeface bodyFont) {
+ // Update font of app names.
+ for (int id : mShapeIconAppNameIds) {
+ TextView appName = mContentView.findViewById(id);
+ appName.setTypeface(bodyFont);
+ }
+ }
+
private void setTopBarIcons(List<Drawable> icons) {
ViewGroup iconsContainer = mContentView.findViewById(R.id.theme_preview_top_bar_icons);
for (int i = 0; i < iconsContainer.getChildCount(); i++) {