Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Theme.Holo.Light.DarkActionBar on Honeycomb

Tags:

android

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

like image 723
Taranfx Avatar asked Mar 05 '12 12:03

Taranfx


1 Answers

I would suggest taking a look at the Sherlock ActionBar. Under the library folder, there is a code intended to make the ActionBar work on versions prior to honeycomb. The guy had to set each of the ActionBar's attributes, so it could be handy exploring it. Look at the abs__styles.xml under the values folder.

Hope it helps and good luck =)

like image 185
Alesqui Avatar answered Oct 27 '22 02:10

Alesqui