Skip to content

Commit 3f9b24e

Browse files
committed
Fix some Holo text color bugs
Fix Switch text color in Holo Light to contrast better - always light text against the dark switch thumb. Fix a bug where TextAppearance.Holo.Small.Inverse was using ?textColorPrimaryInverse instead of ?textColorSecondaryInverse. ("Small" TextAppearance always uses the secondary color.) Bug 6967184 Change-Id: I039bf089d4c7aa257ec4f600df6c0d2066164194
1 parent 9252dbd commit 3f9b24e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

core/res/res/values/styles.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ please see styles_device_defaults.xml.
12591259
</style>
12601260

12611261
<style name="TextAppearance.Holo.Small.Inverse">
1262-
<item name="android:textColor">?textColorPrimaryInverse</item>
1262+
<item name="android:textColor">?textColorSecondaryInverse</item>
12631263
<item name="android:textColorHint">?textColorHintInverse</item>
12641264
<item name="android:textColorHighlight">?textColorHighlightInverse</item>
12651265
<item name="android:textColorLink">?textColorLinkInverse</item>
@@ -1392,6 +1392,13 @@ please see styles_device_defaults.xml.
13921392
</style>
13931393

13941394
<style name="TextAppearance.Holo.Widget.Switch" parent="TextAppearance.Holo.Small">
1395+
<!-- Switch thumb asset presents a dark background. -->
1396+
<item name="android:textColor">@android:color/secondary_text_holo_dark</item>
1397+
</style>
1398+
1399+
<style name="TextAppearance.Holo.Light.Widget.Switch" parent="TextAppearance.Holo.Small">
1400+
<!-- Switch thumb asset presents a dark background. -->
1401+
<item name="android:textColor">@android:color/primary_text_holo_dark</item>
13951402
</style>
13961403

13971404
<style name="TextAppearance.Holo.WindowTitle">
@@ -2317,7 +2324,7 @@ please see styles_device_defaults.xml.
23172324
<style name="Widget.Holo.Light.CompoundButton.Switch" parent="Widget.CompoundButton.Switch">
23182325
<item name="android:track">@android:drawable/switch_track_holo_light</item>
23192326
<item name="android:thumb">@android:drawable/switch_inner_holo_light</item>
2320-
<item name="android:switchTextAppearance">@android:style/TextAppearance.Holo.Widget.Switch</item>
2327+
<item name="android:switchTextAppearance">@android:style/TextAppearance.Holo.Light.Widget.Switch</item>
23212328
<item name="android:textOn">@android:string/capital_on</item>
23222329
<item name="android:textOff">@android:string/capital_off</item>
23232330
<item name="android:thumbTextPadding">12dip</item>

0 commit comments

Comments
 (0)