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:
@@ -101,12 +101,22 @@ public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivit
|
||||
@Override
|
||||
protected void onCreate(Bundle savedState) {
|
||||
super.onCreate(savedState);
|
||||
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
|
||||
ThemeHelper.trySetDynamicColor(this);
|
||||
applyTheme();
|
||||
tryLaunchFontSizeSettings();
|
||||
findViewById(R.id.content_parent).setFitsSystemWindows(false);
|
||||
}
|
||||
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void tryLaunchFontSizeSettings() {
|
||||
if (WizardManagerHelper.isAnySetupWizard(getIntent())
|
||||
|
Reference in New Issue
Block a user