Search code examples
androidactionbarsherlock

Android actionbar sherlok doesn't show divider


I'm using the sherlok-actionbar and trying to apply a divider between the action buttons. I have th style but the dividers are not visible, why?

<style name="Theme.SherlockCustom" parent="@style/Theme.Sherlock.Light">
    <item name="abBackground">@drawable/actionbar_gradient</item>
    <item name="abIcon">@drawable/logo</item>       
    <item name="abDivider">@drawable/ab_divider</item>
</style>

Thanks!


Solution

  • ActionBarSherlock v3.5 was updated to include the sources from Ice Cream Sandwich for all action-item related views and classes. This means that the rules for placing a divider between two action items follows the same rules as it would on ICS.

    A divider would only be shown between the following:

    • Text-only followed by text-only
    • Icon-only followed by text-only
    • Text and icon followed by text-only

    If you want to override this behavior (on pre-3.0 only) make the following change to ActionItemView.java: