diff options
author | Maurice Lam <yukl@google.com> | 2017-04-03 12:39:34 -0700 |
---|---|---|
committer | Maurice Lam <yukl@google.com> | 2017-04-04 16:11:53 -0700 |
commit | e46be9bcf0dd195989b10768ceb57dd2c70095a9 (patch) | |
tree | cbca48a4b2986cf06cb8787ae873e11a87ba671a /library/main | |
parent | f6b2d025f617ddadd5b6d18ff2c61f39a2085163 (diff) | |
download | setupwizard-e46be9bcf0dd195989b10768ceb57dd2c70095a9.tar.gz |
Rename GLIF Pixel to GLIF v2
Since we are giving the option to OEMs to use the center alignment
theme, rename it to something not Pixel specific.
Test: Tests updated. ./gradlew connectedAndroidTest test
Bug: 36857917
Change-Id: I09b0ebb743ccaa0ad6b215a12576ce1109a3fa31
Diffstat (limited to 'library/main')
-rw-r--r-- | library/main/res/values/styles.xml | 10 | ||||
-rw-r--r-- | library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java | 28 |
2 files changed, 28 insertions, 10 deletions
diff --git a/library/main/res/values/styles.xml b/library/main/res/values/styles.xml index 83b3574..0755cc8 100644 --- a/library/main/res/values/styles.xml +++ b/library/main/res/values/styles.xml @@ -19,7 +19,7 @@ <!-- General styles --> - <style name="SuwThemeGlifPixel" parent="SuwThemeGlif"> + <style name="SuwThemeGlifV2" parent="SuwThemeGlif"> <item name="android:windowLightStatusBar" tools:targetApi="m">false</item> <item name="suwBackgroundBaseColor">?android:attr/colorBackground</item> @@ -28,7 +28,10 @@ <item name="suwScrollIndicators">top|bottom</item> </style> - <style name="SuwThemeGlifPixel.Light" parent="SuwThemeGlif.Light"> + <!-- Deprecated. Use SuwThemeGlifV2 instead --> + <style name="SuwThemeGlifPixel" parent="SuwThemeGlifV2" /> + + <style name="SuwThemeGlifV2.Light" parent="SuwThemeGlif.Light"> <item name="android:windowLightStatusBar" tools:targetApi="m">true</item> <item name="suwBackgroundBaseColor">?android:attr/colorBackground</item> @@ -37,6 +40,9 @@ <item name="suwScrollIndicators">top|bottom</item> </style> + <!-- Deprecated. Use SuwThemeGlifV2.Light instead --> + <style name="SuwThemeGlifPixel.Light" parent="SuwThemeGlifV2.Light" /> + <style name="Animation.SuwWindowAnimation" parent="@android:style/Animation.Activity"> <item name="android:activityOpenEnterAnimation">@anim/suw_slide_next_in</item> <item name="android:activityOpenExitAnimation">@anim/suw_slide_next_out</item> diff --git a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java index cd04cf2..f25d646 100644 --- a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java +++ b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java @@ -71,13 +71,25 @@ public class WizardManagerHelper { * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the dark variant of the * theme used in setup wizard for O DR. */ - public static final String THEME_GLIF_PIXEL = "glif_pixel"; + public static final String THEME_GLIF_V2 = "glif_v2"; + + /** + * @deprecated Use {@link #THEME_GLIF_V2} instead. + */ + @Deprecated + public static final String THEME_GLIF_PIXEL = THEME_GLIF_V2; /** * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in * setup wizard for O DR. */ - public static final String THEME_GLIF_PIXEL_LIGHT = "glif_pixel_light"; + public static final String THEME_GLIF_V2_LIGHT = "glif_v2_light"; + + /** + * @deprecated Use {@link #THEME_GLIF_V2_LIGHT} instead. + */ + @Deprecated + public static final String THEME_GLIF_PIXEL_LIGHT = THEME_GLIF_V2_LIGHT; /** * Get an intent that will invoke the next step of setup wizard. @@ -208,10 +220,10 @@ 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_PIXEL_LIGHT.equals(theme)) { + || THEME_GLIF_LIGHT.equals(theme) || THEME_GLIF_V2_LIGHT.equals(theme)) { return true; } else if (THEME_HOLO.equals(theme) || THEME_MATERIAL.equals(theme) - || THEME_GLIF.equals(theme) || THEME_GLIF_PIXEL.equals(theme)) { + || THEME_GLIF.equals(theme) || THEME_GLIF_V2.equals(theme)) { return false; } else { return def; @@ -256,10 +268,10 @@ public class WizardManagerHelper { public static @StyleRes int getThemeRes(String theme, @StyleRes int defaultTheme) { if (theme != null) { switch (theme) { - case THEME_GLIF_PIXEL_LIGHT: - return R.style.SuwThemeGlifPixel_Light; - case THEME_GLIF_PIXEL: - return R.style.SuwThemeGlifPixel; + case THEME_GLIF_V2_LIGHT: + return R.style.SuwThemeGlifV2_Light; + case THEME_GLIF_V2: + return R.style.SuwThemeGlifV2; case THEME_GLIF_LIGHT: return R.style.SuwThemeGlif_Light; case THEME_GLIF: |