I’ve an app that would run on both ICS, honeycomb. For both these flavors, I wish to keep same theme: Theme.Holo.Light.DarkActionBar which is SDK >=14.
I created a custom style:
<style name="ActionBar.Dark" parent="@style/ActionBar">
<item name="android:background">@color/actionbar_background_dark</item>
</style>
<style name="Holo.light.dark.actionbar" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBar.Dark</item>
<item name="android:titleTextStyle">@android:style/TextAppearance.Holo.Widget.ActionBar.Title</item>
<item name="android:subtitleTextStyle">@android:style/TextAppearance.Holo.Widget.ActionBar.Subtitle</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:windowActionBarOverlay">false</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_transparent_light_holo</item>
<item name="android:backgroundSplit">@drawable/ab_bottom_transparent_dark_holo</item>
<item name="android:homeAsUpIndicator">@drawable/ic_ab_back_holo_dark</item>
</style>
But this does only the half job, the dropdown spinner has white background with white text and all window titles are black text on black background.
How do I know of all the attributes that I should set to achieve full Theme.Holo.Light.DarkActionBar
I would suggest taking a look at the Sherlock ActionBar. Under the
libraryfolder, there is a code intended to make theActionBarwork on versions prior to honeycomb. The guy had to set each of theActionBar‘s attributes, so it could be handy exploring it. Look at theabs__styles.xmlunder thevaluesfolder.Hope it helps and good luck =)