diff options
author | Maurice Lam <yukl@google.com> | 2017-12-01 12:51:42 -0800 |
---|---|---|
committer | Maurice Lam <yukl@google.com> | 2017-12-01 12:51:42 -0800 |
commit | 8b52391bba333441da82aed544bd58fae9586f15 (patch) | |
tree | db882103738ee81997bf59d2baad2dfaba8d1ed6 /library/main/src | |
parent | e2d1593a5a52765e60094542141b75c4e9a0ca04 (diff) | |
download | setupwizard-8b52391bba333441da82aed544bd58fae9586f15.tar.gz |
Add GLIF v3 theme and make buttons Google Blue 600
Test: ./gradlew test
Bug: 69930196
Change-Id: Iba6be8daad2f27925647e43a6a1c5e19c03fb7bb
Diffstat (limited to 'library/main/src')
-rw-r--r-- | library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java index 32929aa..f4bb8f5 100644 --- a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java +++ b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java @@ -98,6 +98,18 @@ public class WizardManagerHelper { public static final String THEME_GLIF_PIXEL_LIGHT = THEME_GLIF_V2_LIGHT; /** + * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the dark variant of the + * theme used in setup wizard for P. + */ + public static final String THEME_GLIF_V3 = "glif_v3"; + + /** + * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in + * setup wizard for P. + */ + public static final String THEME_GLIF_V3_LIGHT = "glif_v3_light"; + + /** * Get an intent that will invoke the next step of setup wizard. * * @param originalIntent The original intent that was used to start the step, usually via @@ -253,10 +265,12 @@ public class WizardManagerHelper { */ public static boolean isLightTheme(String theme, boolean def) { if (THEME_HOLO_LIGHT.equals(theme) || THEME_MATERIAL_LIGHT.equals(theme) - || THEME_GLIF_LIGHT.equals(theme) || THEME_GLIF_V2_LIGHT.equals(theme)) { + || THEME_GLIF_LIGHT.equals(theme) || THEME_GLIF_V2_LIGHT.equals(theme) + || THEME_GLIF_V3_LIGHT.equals(theme)) { return true; } else if (THEME_HOLO.equals(theme) || THEME_MATERIAL.equals(theme) - || THEME_GLIF.equals(theme) || THEME_GLIF_V2.equals(theme)) { + || THEME_GLIF.equals(theme) || THEME_GLIF_V2.equals(theme) + || THEME_GLIF_V3.equals(theme)) { return false; } else { return def; @@ -301,6 +315,10 @@ public class WizardManagerHelper { public static @StyleRes int getThemeRes(String theme, @StyleRes int defaultTheme) { if (theme != null) { switch (theme) { + case THEME_GLIF_V3_LIGHT: + return R.style.SuwThemeGlifV3_Light; + case THEME_GLIF_V3: + return R.style.SuwThemeGlifV3; case THEME_GLIF_V2_LIGHT: return R.style.SuwThemeGlifV2_Light; case THEME_GLIF_V2: |