I am currently working on making my application compatible with pre 3.0 devices with the aid of actionbarsherlock. My application has a custom theme which overide Holo.light changing the blue to orange.
I am wanting to change the blue line which appears under the actionbar to orange. With the official actionbar I managed this by overriding
<item name="android:background">@drawable/ad_tab_unselected_holo</item>
Unfortunately this does not seem to be working in actionbarsherlock 4.
You need to do two things:
The ABS 4 now mimics the standard Action bar with its attributes so you need to add -
<item name="background">@drawable/ad_tab_unselected_holo</item>
Notice the absence of android:
So your overall code would be:
<item name="android:background">@drawable/ad_tab_unselected_holo</item>
<item name="background">@drawable/ad_tab_unselected_holo</item>
To quote:
Due to limitations in Android's theming system any theme customizations must be declared in two attributes. The normal android-prefixed attributes apply the theme to the native action bar and the unprefixed attributes are for the custom implementation. Since both theming APIs are exactly the same you need only reference your customizations twice rather than having to implement them twice.
I would also extend a varient of Theme.Sherlock
rather than holo, as I believe holo is not available on older devices that are pre 3.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With