Reputation: 560
My question is simple to understand. How to change colors of ActionBarSherlock Tabs Color
and the line under the tabs?
In the AndroidManifest, in the application part, I write:
android:theme="@style/Theme.Sherlock"
I want to change the colors of the tabs and the lines under the tabs.
I tried a lot of ways that I could find in the stackOverflow but they do not work.
Upvotes: 2
Views: 2769
Reputation: 67
you can change color of tab by changing drawbles of Sherlock liberary. in drawable folder of Sherlock there is some png files. for changing color of line under tab you should edit "abs__tab_selected_pressed_holo.9.png" and "abs__tab_selected_holo.9.png".
for changing tab color you should change "abs__ab_stacked_solid_light_holo.9.png".
and another files similar to this. note that you should change drawable-mdpi and drawable-xhdpi and other platform folders too.
Upvotes: 1
Reputation: 6899
In styles.xml use like this whatever color you need.
<style name="Theme.A" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:titleTextStyle">@style/Widget.MyTheme.ActionBar.TitleTextStyle</item>
</style>
<style name="Widget.MyTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
<item name="android:background">@color/green</item>
<item name="background">@color/green</item>
</style>
<style name="Widget.MyTheme.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
<item name="android:textColor">@android:color/white</item>
</style>
Such a way you can use it.
Upvotes: 0