Fix toggle display and preferen style old style and barely seen in “Vision Settings”
Root cause: Apply ThemeHelper.trySetDynamicColor would overlay the settings style. Solution: Create SudDynamicColorThemeSettings.SetupWizard to support dynamicColor and settings style. Bug: 192410829 Test: manual test Change-Id: Ic196dfe417e7f804c68ed4ea7bc05b4716999bcf
This commit is contained in:
@@ -91,10 +91,17 @@ public class SettingsBaseActivity extends FragmentActivity implements CategoryHa
|
||||
// Apply SetupWizard light theme during setup flow. This is for SubSettings pages.
|
||||
final boolean isAnySetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
|
||||
if (isAnySetupWizard && this instanceof SubSettings) {
|
||||
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
|
||||
? R.style.SubSettings_SetupWizard : R.style.SudThemeGlifV3_Light;
|
||||
int appliedTheme;
|
||||
if (ThemeHelper.trySetDynamicColor(this)) {
|
||||
appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
|
||||
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
|
||||
: R.style.SudDynamicColorThemeSettings_SetupWizard;
|
||||
} else {
|
||||
appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
|
||||
? R.style.SubSettings_SetupWizard
|
||||
: R.style.SudThemeGlifV3_Light;
|
||||
}
|
||||
setTheme(appliedTheme);
|
||||
ThemeHelper.trySetDynamicColor(this);
|
||||
}
|
||||
|
||||
if (isToolbarEnabled() && !isAnySetupWizard) {
|
||||
|
Reference in New Issue
Block a user