Does anyone know the style resource to use for the split action bar when using sdk version 14 android:uiOptions="splitActionBarWhenNarrow"
?
For the normal ActionBar
I can use
<item name="android:actionBarStyle">@style/MyActionBar</item>
But this does not automatically overflow to the split bar at the bottom.
I have tried
<item name="android:actionBarSplitStyle">@style/MyActionBar</item>
<item name="android:actionBarTabBarStyle">@style/MyActionBar</item>
But they both have no effect on the Galaxy Nexus
This answer is basically niko34's but in a little bit more detail. Currently I have both the top actionbar and the lower actionbar (the lower actionbar is more properly named as the split actionbar) styled the same, but you'll see it's pretty darn simple to style them differently. I am using ActionBarSherlock v4.2.0, and have tested and run this flawlessly on both a Samsung Galaxy S3 running Jelly Bean and an HTC Droid Incredible running Gingerbread.
AndroidManifest.xml
res/values/themes.xml
Here you can see how I'm referencing
@drawable/bg_actionbar
a couple of times. That is an xml file that is located in theres/drawable
directory. Below is the source of that file.res/drawable/bg_actionbar.xml
Here,
android:src="@drawable/bg_tile"
is just referencing mybg_tile.png
file, which is located inres/drawable-hdpi
,res/drawable-ldpi
,res/drawable-mdpi
, andres/drawable-xhdpi
.So all of this was probably more information than necessary, but it's better than not having enough! :)
This question is old, but i've just handled the same problem. If it can help someone else...
The split bar is also styled using ActionBarStyle.
For example, if you want to style the bottom part of the split action bar, you can use the item named backgroundSplit in your MyActionBar style.
you can use a style instead of the drawable to customize the backgrounds, but if prefer this to define backgrounds in drawables.