Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40c94575 authored by chihhangchuang's avatar chihhangchuang Committed by Automerger Merge Worker
Browse files

[Phase 3 Review] Update theme preview am: 00103e5f

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/ThemePicker/+/11818386

Change-Id: I27fcac9e9441a11f30d3f1311356f5f4e6d0f799
parents 121dab24 00103e5f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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>
+8 −5
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ class ThemeOptionPreviewer implements LifecycleObserver {
    /** 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,15 +253,17 @@ class ThemeOptionPreviewer implements LifecycleObserver {
        mStatusBarClock.setTypeface(headlineFont);
        mSmartSpaceDate.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(headlineFont);
            appName.setTypeface(bodyFont);
        }

        // Update font of color/icons section title.
        TextView colorIconsSectionTitle = mContentView.findViewById(R.id.color_icons_section_title);
        colorIconsSectionTitle.setTypeface(headlineFont);
    }

    private void setTopBarIcons(List<Drawable> icons) {