Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
367 views
in Technique[技术] by (71.8m points)

actionbarsherlock - 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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...