Android ActionBar Background Color Split Mode Tab

X

First of all, I want to say that I use ActionBarSherlock (screenshots taken on Samsung Galaxy S3).

I have an action bar with a tab in it, I want the tab to be gray when it is split (the tab is under the action bar) and transparent (or the same color as the taskbar screen) when Tab inside the action bar.

Here is a small snippet of my styles.xml code:

<style name="Theme.OSP.Light" parent="@style/Theme.Sherlock.Light">
        <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
        <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>

        <item name="actionBarTabBarStyle">@style/Widget.Styled.ActionBar.TabBar</item>
        <item name="android:actionBarTabBarStyle">@style/Widget.Styled.ActionBar.TabBar</item>
    </style>

    <style name="Widget.Styled.ActionBar" parent="Widget.Sherlock.Light.ActionBar">        
        <item name="android:background">#F0F0F0</item>
        <item name="background">#F0F0F0</item>
    </style>

    <style name="Widget.Styled.ActionBar.TabBar" parent="Widget.Sherlock.Light.ActionBar.TabBar">
        <item name="android:background">#E0E0E0</item>
        <item name="android:gravity">center</item>
    </style>

Below are screenshots to make my question more understandable.

Landscape (the action bar is not broken). This is not normal, the tabba should have the same color as the action bar, but instead has the same gray color: Landscape (actionbar is not splitted)

Portrait (split action bar). This is normal, there is a gray color on the scoreboard in this state: Portrait (actionbar is splitted)

+5

All Articles