Search code examples
androidactionbarsherlock

ActionBarSherlock ActionBar hidden when themed in Android 2.3


I'm trying to personalize UI for my app, but when i change the background of the actionbar, the ActionBar not showing but the split actionbar is ok. In some activity, i see the ActionBar with theme but just menu item (no appicon and title). In Android 4.0 it works very fine, but i've this problem in compatibility mode (Android 2.3)

The code of the theme

<style name="aTheme" parent="@style/Theme.Sherlock">
    <item name="android:actionBarStyle">@style/ActionBar.a</item>
    <item name="actionBarStyle">@style/ActionBar.a</item>
</style>

<!-- style actionbar -->
<style name="ActionBar.a" parent="@android:style/Widget.Holo.ActionBar">
    <item name="background">@drawable/sc4th_actionbartop</item>
    <item name="backgroundSplit">@drawable/sc4th_actionbarbot</item>
    <item name="android:background">@drawable/sc4th_actionbartop</item>
    <item name="android:backgroundSplit">@drawable/sc4th_actionbarbot</item>
</style>

Solution

  • Solved ! Replaced <style name="ActionBar.a" parent="@android:style/Widget.Holo.ActionBar"> by <style name="ActionBar.a" parent="Widget.Sherlock.ActionBar">