6

Hello android developers, I know this question have been asked many of times, and I have also tried many solutions but they are not working for me. Firstly I am using action bar sherlock library to show action bar,and I want to show dividers between menu items with icons only. For that I create custom style for showing divider but they are not showing.

<style name="Theme.SherlockCustom" parent="@style/Theme.Sherlock.Light">

<item name="android:actionBarDivider">@drawable/actionbar_seprator</item>

<item name="android:showDividers">middle</item>

</style>

And also tried to update sherlock library ActionMenuItemView.java for ActionBar where needsDividerBefore() will always give true. But this patch also not worked for me. Please help where I am going wrong. Thanks.

4

1 回答 1

0

除非您为操作栏使用自定义视图,否则您无法在 > 4.0 的版本中获得分隔符;本机实现在内部控制行为,并且不提供任何钩子来修改它。

HTH,阿里。

于 2013-06-28T02:04:29.220 回答