Set GLIF v1 background color to true white/black
To make sure the same video asset can be used for both GLIF v1 and v2, change the background of v1 to be #ffffff and #000000 to match GLIF v2. Bug: 37686500 Test: Manual. Existing tests updated Change-Id: I70c60f8a9dfade6dbac376f01f26023bac1c7aee
This commit is contained in:
parent
f4ea628411
commit
c57872c260
|
@ -80,6 +80,7 @@
|
|||
</style>
|
||||
|
||||
<style name="SuwThemeGlif" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:colorBackground">@color/suw_glif_background_color_dark</item>
|
||||
<item name="android:indeterminateTint" tools:ignore="NewApi">?attr/colorControlActivated</item>
|
||||
<!-- Specify the indeterminateTintMode to work around a bug in Lollipop -->
|
||||
<item name="android:indeterminateTintMode" tools:ignore="NewApi">src_in</item>
|
||||
|
@ -113,6 +114,7 @@
|
|||
</style>
|
||||
|
||||
<style name="SuwThemeGlif.Light" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:colorBackground">@color/suw_glif_background_color_light</item>
|
||||
<item name="android:indeterminateTint" tools:ignore="NewApi">?attr/colorControlActivated</item>
|
||||
<!-- Specify the indeterminateTintMode to work around a bug in Lollipop -->
|
||||
<item name="android:indeterminateTintMode" tools:ignore="NewApi">src_in</item>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<!-- GLIF colors -->
|
||||
<color name="suw_color_accent_glif_dark">#ff4285f4</color>
|
||||
<color name="suw_color_accent_glif_light">#ff4285f4</color>
|
||||
<color name="suw_glif_v2_background_color_dark">#ff000000</color>
|
||||
<color name="suw_glif_v2_background_color_light">#ffffffff</color>
|
||||
<color name="suw_glif_background_color_dark">#ff000000</color>
|
||||
<color name="suw_glif_background_color_light">#ffffffff</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<!-- General styles -->
|
||||
|
||||
<style name="SuwThemeGlifV2" parent="SuwThemeGlif">
|
||||
<item name="android:colorBackground">@color/suw_glif_v2_background_color_dark</item>
|
||||
<item name="android:colorBackground">@color/suw_glif_background_color_dark</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
|
||||
<item name="suwBackgroundBaseColor">?android:attr/colorBackground</item>
|
||||
|
@ -36,7 +36,7 @@
|
|||
<style name="SuwThemeGlifPixel" parent="SuwThemeGlifV2" />
|
||||
|
||||
<style name="SuwThemeGlifV2.Light" parent="SuwThemeGlif.Light">
|
||||
<item name="android:colorBackground">@color/suw_glif_v2_background_color_light</item>
|
||||
<item name="android:colorBackground">@color/suw_glif_background_color_light</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
|
||||
|
||||
<item name="suwBackgroundBaseColor">?android:attr/colorBackground</item>
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
<!-- Placeholder for GLIF dark theme, colors are not updated yet -->
|
||||
<style name="SuwThemeGlif" parent="android:Theme.Material.NoActionBar">
|
||||
<item name="android:colorAccent">@color/suw_color_accent_glif_dark</item>
|
||||
<item name="android:colorBackground">@color/suw_glif_background_color_dark</item>
|
||||
<item name="android:colorPrimary">@color/suw_color_accent_glif_dark</item>
|
||||
<item name="android:indeterminateTint">?android:attr/colorPrimary</item>
|
||||
<!-- Specify the indeterminateTintMode to work around a bug in Lollipop -->
|
||||
|
@ -111,6 +112,7 @@
|
|||
|
||||
<style name="SuwThemeGlif.Light" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:colorAccent">@color/suw_color_accent_glif_light</item>
|
||||
<item name="android:colorBackground">@color/suw_glif_background_color_light</item>
|
||||
<item name="android:colorPrimary">@color/suw_color_accent_glif_light</item>
|
||||
<item name="android:indeterminateTint">?android:attr/colorPrimary</item>
|
||||
<!-- Specify the indeterminateTintMode to work around a bug in Lollipop -->
|
||||
|
|
|
@ -115,7 +115,7 @@ public class GlifLayoutTest {
|
|||
}
|
||||
|
||||
assertEquals("Status bar color should be white in GLIF v2 theme",
|
||||
"fffafafa",
|
||||
"ffffffff",
|
||||
Integer.toHexString(glifLayout.getBackgroundBaseColor().getDefaultColor()));
|
||||
assertFalse("GLIF v2 theme shuold not have patterned background",
|
||||
glifLayout.isBackgroundPatterned());
|
||||
|
|
Loading…
Reference in a new issue