The action bar style makes the action bar disappear

I am trying to describe my action bar. When I apply my theme, the preview (in Android Studio) displays it correctly, but at runtime on the device the action bar is completely absent.

My values ​​are /styles.xml file:

<resources>
    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
        <item name="android:windowBackground">@color/background_gray</item>
        <item name="android:actionBarStyle">@style/GreenActionBar</item>
    </style>
    <style name="AppTheme" parent="AppBaseTheme"/>

    <style name="GreenActionBarBase">
        <item name="android:background">#00c341</item>
    </style>

    <style name="GreenActionBar" parent="GreenActionBarBase"/>    

</resources>

Preview:

Preview

Runtime:

Runtime

What am I missing?

+3
source share
1 answer
<resources>
    <style name="AppBaseTheme" parent="@style/Theme.Holo.Light">
        <item name="android:windowBackground">@color/background_gray</item>
        <item name="android:actionBarStyle">@style/GreenActionBar</item>
    </style>
    <style name="AppTheme" parent="AppBaseTheme"/>

    <style name="GreenActionBarBase" parent="@style/Widget.THE_STYLE_YOU_WANT">
        <item name="android:background">#00c341</item>
    </style>

    <style name="GreenActionBar" parent="GreenActionBarBase"/>    

</resources>

Check the answer. I think you need to have a parent for GreenActionBarBase.

+7
source

All Articles