Android Custom Theming in ActionBar/Tabs
Asked Answered
M

1

7

I have the theme Holo.Light.DarkActionBar

The tabs are now set to white background, light gray text--very unreadable. I simply want to change the text to something much, much darker.

I have searched the styles to see if I can override but all I can do is change the background, not the text.

Can I do this in the styles.xml or do I have to do this programmaticly?

Mammillary answered 19/7, 2012 at 15:40 Comment(1)
It's interesting some have favorited this question, yet no answers. How could something so basic be such a headache?Mammillary
P
20

If you're referring to the ActionBar's tab see if this changes the color:

<!-- The theme for the activity -->
<style name="TabSpecialTheme" parent="android:Theme.Holo.Light.DarkActionBar">
      <item name="@android:attr/actionBarTabTextStyle">@style/TabStyle</item>
</style>

<!-- Modify the text color -->
<style name="TabStyle" parent="android:Widget.Holo.Light.ActionBar.TabText.Inverse">
      <item name="android:textColor">#F70000</item>
</style>

Of course don't forget to set the theme for the activity to @style/TabSpecialTheme in the manifest.

Phocomelia answered 19/7, 2012 at 19:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.