I have used ActionBarSherlock in my application for providing ActionBars to pre honeycomb devices. I want to use Light.DarkActionBar Theme in, How can I customize following for parts of the ActionBar (see image)
I have tried using following settings, Though I have achieved some success but the result however doesn't look as expected,
<item name="android:background">@drawable/bg_title_bar</item>
<item name="background">@drawable/bg_title_bar</item>
<item name="actionModeSplitBackground">@drawable/bg_tab_bar</item>
<item name="android:actionModeSplitBackground">@drawable/bg_tab_bar</item>
Which are the other settings that I should use ? Thanks!!
This is how I did it just in case someone has similar requirements in future..
I downloaded a sample zip file from Style Genarator... Unzipping and a close look on the content suggested that I needed following attributes,
for Background color of ActionBar
<item name="background">@drawable/title_bg</item>
<item name="android:background">@drawable/title_bg</item>
2. for Background Image for ActionBar tab bar
<item name="backgroundStacked">@drawable/tab_bg</item>
<item name="android:backgroundStacked">@drawable/tab_bg</item>
3. for The bottom line which represents the selected tab
i. I created a style as follows
<style name="ActionBar.TabStyle" parent="@style/Widget.Sherlock.Light.ActionBar.TabView">
<item name="background">@drawable/ab_tab_indicator</item>
<item name="android:background">@drawable/ab_tab_indicator</item>
</style>
ii. I used that style in the theme as follows
<item name="actionBarTabStyle">@style/ActionBar.TabStyle</item>
<item name="android:actionBarTabStyle">@style/ActionBar.TabStyle</item>
4 for The divider between tabs...
in theme I added two lines..
<item name="actionBarTabBarStyle">@style/My.ActionBar.TabBar</item>
<item name="android:actionBarTabBarStyle">@style/My.ActionBar.TabBar</item>
than
<style name="My.ActionBar.TabBar" parent="@android:style/Widget.Holo.ActionBar.TabBar">
<item name="divider">@drawable/tab_divider</item>
<item name="android:showDividers">middle</item>
<item name="android:divider">@drawable/tab_divider</item>
<item name="android:dividerHeight">24dp</item>
<item name="android:dividerPadding">8dp</item>
<!-- <item name="android:background">@drawable/tab_unselected</item> -->
</style>