Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Custom Theming in ActionBar/Tabs

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?

like image 574
TheLettuceMaster Avatar asked Jul 19 '12 15:07

TheLettuceMaster


1 Answers

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.

like image 101
user Avatar answered Sep 24 '22 07:09

user