Android的动作条sherlok不显示分动作、Android、sherlok

2023-09-12 22:39:11 作者:缥缈孤鸿影

我使用的是sherlok,动作条,并尝试应用的操作按钮之间的分隔。 我有个风格,但分频器是不可见的,为什么呢?

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>

谢谢!

推荐答案

ActionBarSherlock V3.5进行了更新,包括冰淇淋三明治来源所有行动项目相关的意见和类。这意味着,将两个行动项目之间的分隔规则遵循相同的规则,因为它会在ICS。

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:

纯文本之后的纯文本 图标,仅接着的纯文本 文本和图标后面的纯文本

如果你想改变这种行为(在pre-3.0只)进行了如下修改 ActionItemView.java

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