Create the glifv4 theme and set to glifv4 theme when the themestring is glifv4.

screen shot:
https://hsv.googleplex.com/5487921525161984
https://hsv.googleplex.com/4853914928152576
https://hsv.googleplex.com/6492643191160832
https://hsv.googleplex.com/5915886260060160
https://hsv.googleplex.com/6321050657751040
https://hsv.googleplex.com/6222016362315776

Bug: 233036258
Bug: 233032365
Change-Id: If2bb4a82912bfdd18dc17ced11adc59eaf474bed
This commit is contained in:
Hank Sheng
2022-05-24 11:08:19 +00:00
parent 02314870c7
commit bdda48ebe5
3 changed files with 44 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
<style name="GlifTheme.DayNight" parent="GlifTheme" />
<style name="GlifV2Theme.DayNight" parent="GlifV2Theme" />
<style name="GlifV3Theme.DayNight" parent="GlifV3Theme" />
<style name="GlifV4Theme.DayNight" parent="GlifV4Theme" />
<style name="GlifV3Theme.DayNight.NoActionBar" parent="GlifV3Theme.NoActionBar" />
<style name="GlifV2Theme.DayNight.Transparent" parent="GlifV2Theme.Transparent" />
<style name="GlifV3Theme.DayNight.Transparent" parent="GlifV3Theme.Transparent" />

View File

@@ -133,6 +133,43 @@
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
</style>
<style name="GlifV4Theme" parent="SudThemeGlifV4.DayNight">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/GlifV2ThemeAlertDialog</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
<item name="*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
<item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
<item name="face_layout_theme">@style/FaceLayoutTheme</item>
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
<item name="side_margin">0dip</item>
<item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>
<item name="wifi_signal">@drawable/wifi_signal</item>
<item name="wifi_friction">@drawable/wifi_friction</item>
<item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
<item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
<!-- LockPatternView colors -->
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
</style>
<style name="GlifV4Theme.Light" parent="SudThemeGlifV4.Light">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/GlifV2ThemeAlertDialog.Light</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
<item name="*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
<item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
<item name="face_layout_theme">@style/FaceLayoutTheme</item>
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
<item name="side_margin">0dip</item>
<item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
<item name="wifi_signal">@drawable/wifi_signal</item>
<item name="wifi_friction">@drawable/wifi_friction</item>
<item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
<item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
</style>
<style name="GlifV3Theme.Light.NoActionBar" parent="GlifV3Theme.Light">
<item name="android:windowActionBar">false</item>
</style>
@@ -238,6 +275,7 @@
<style name="GlifTheme.DayNight" parent="GlifTheme.Light" />
<style name="GlifV2Theme.DayNight" parent="GlifV2Theme.Light" />
<style name="GlifV3Theme.DayNight" parent="GlifV3Theme.Light" />
<style name="GlifV4Theme.DayNight" parent="GlifV4Theme.Light" />
<style name="GlifV3Theme.DayNight.NoActionBar" parent="GlifV3Theme.Light.NoActionBar" />
<style name="GlifV2Theme.DayNight.Transparent" parent="GlifV2Theme.Light.Transparent" />
<style name="GlifV3Theme.DayNight.Transparent" parent="GlifV3Theme.Light.Transparent" />

View File

@@ -48,9 +48,9 @@ public class SetupWizardUtils {
if (WizardManagerHelper.isAnySetupWizard(intent)) {
if (ThemeHelper.isSetupWizardDayNightEnabled(context)) {
switch (theme) {
// TODO(b/233032365): Create glif v4 theme for this case.
case ThemeHelper.THEME_GLIF_V4_LIGHT:
case ThemeHelper.THEME_GLIF_V4:
return R.style.GlifV4Theme_DayNight;
case ThemeHelper.THEME_GLIF_V3_LIGHT:
case ThemeHelper.THEME_GLIF_V3:
return R.style.GlifV3Theme_DayNight;
@@ -63,11 +63,12 @@ public class SetupWizardUtils {
}
} else {
switch (theme) {
// TODO(b/233032365): Create glif v4 theme for this case.
case ThemeHelper.THEME_GLIF_V4_LIGHT:
return R.style.GlifV4Theme_Light;
case ThemeHelper.THEME_GLIF_V4:
return R.style.GlifV4Theme;
case ThemeHelper.THEME_GLIF_V3_LIGHT:
return R.style.GlifV3Theme_Light;
case ThemeHelper.THEME_GLIF_V4:
case ThemeHelper.THEME_GLIF_V3:
return R.style.GlifV3Theme;
case ThemeHelper.THEME_GLIF_V2_LIGHT:
@@ -82,9 +83,9 @@ public class SetupWizardUtils {
}
} else {
switch (theme) {
// TODO(b/233032365): Create glif v4 theme for this case.
case ThemeHelper.THEME_GLIF_V4_LIGHT:
case ThemeHelper.THEME_GLIF_V4:
return R.style.GlifV4Theme;
case ThemeHelper.THEME_GLIF_V3_LIGHT:
case ThemeHelper.THEME_GLIF_V3:
return R.style.GlifV3Theme;