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

Commit 8b6bbda2 authored by Cn Chen's avatar Cn Chen Committed by Android (Google) Code Review
Browse files

Merge "Properly apply the SUW dynamic color theme" into tm-dev

parents 6d0b9c7b 27536c83
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -224,26 +224,6 @@
        <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
    </style>

    <!-- This theme was applied to Settings pages which are running under SUW with DynamicColor. -->
    <style name="SudDynamicColorThemeSettings.SetupWizard" parent="SudDynamicColorThemeGlifV3.Light">
        <item name="android:textAppearanceListItem">@style/TextAppearance.PreferenceTitle.SettingsLib</item>
        <item name="android:listPreferredItemPaddingStart">24dp</item>
        <item name="android:listPreferredItemPaddingEnd">16dp</item>
        <item name="preferenceTheme">@style/PreferenceTheme.SettingsLib</item>
        <item name="android:switchStyle">@style/Switch.SettingsLib</item>
        <item name="preferenceFragmentCompatStyle">@style/SetupWizardPreferenceFragmentStyle</item>
    </style>

    <!-- This theme was applied to Settings pages which are running under SUW with DynamicColor. -->
    <style name="SudDynamicColorThemeSettings.SetupWizard.DayNight" parent="SudDynamicColorThemeGlifV3.DayNight">
        <item name="android:textAppearanceListItem">@style/TextAppearance.PreferenceTitle.SettingsLib</item>
        <item name="android:listPreferredItemPaddingStart">24dp</item>
        <item name="android:listPreferredItemPaddingEnd">16dp</item>
        <item name="preferenceTheme">@style/PreferenceTheme.SettingsLib</item>
        <item name="android:switchStyle">@style/Switch.SettingsLib</item>
        <item name="preferenceFragmentCompatStyle">@style/SetupWizardPreferenceFragmentStyle</item>
    </style>

    <!-- This theme was applied to Settings pages which are running under SUW. -->
    <style name="SettingsPreferenceTheme.SetupWizard" parent="@style/PreferenceTheme.SettingsLib">
        <item name="android:textAppearanceListItem">@style/TextAppearance.PreferenceTitle.SettingsLib</item>
+3 −8
Original line number Diff line number Diff line
@@ -54,13 +54,8 @@ public abstract class WifiDppBaseActivity extends InstrumentedActivity {
    }

    private void applyTheme() {
        if (ThemeHelper.trySetDynamicColor(this)) {
            final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
                    ? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
                    : R.style.SudDynamicColorThemeSettings_SetupWizard;
            setTheme(appliedTheme);
        } else {
        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
        }
        setTheme(R.style.SettingsPreferenceTheme_SetupWizard);
        ThemeHelper.trySetDynamicColor(this);
    }
}