I am using the ViewpagerIndicator library by Jake Wharton. I use tabs code along with the ActionBarSherlock library. Everything works fine, but I'm trying to create a tab background and can't figure out how to do this. I need a dark action panel with dark tabs and light fragments (tab contents) .
The main theme I use is Theme.Sherlock.Light.DarkActionBar. I am expanding this style by creating it as the parent of the style that sets the attributes for the tabs (for example, text color, indicator color, etc.). This results in a dark action bar, light tabs and light fragments.
I can not find anything that will change the background of the tabs themselves. The only thing I can change is to change the whole application to darkness (using Theme.Sherlock). Here is my code:
<style name="vpiTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item> </style> <style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator"> <item name="android:textColor">#FF000000</item> <item name="android:paddingTop">6dp</item> <item name="android:paddingBottom">6dp</item> <item name="android:paddingLeft">16dip</item> <item name="android:paddingRight">16dip</item> <item name="android:maxLines">2</item> </style>
android colors background tabs viewpagerindicator
Flyview
source share