如何在操作栏下拉菜单导航中隐藏分隔线?这是我想隐藏的分隔符:
http://s10.postimage.org/4sjqjxltl/4nk4k.png
我尝试了以下样式:
<style name="MyActionBar" parent="Widget.Sherlock.Light.ActionBar">
<item name="android:background">@drawable/actionbar_bg_shape</item>
<item name="background">@drawable/actionbar_bg_shape</item>
<item name="android:showDividers">none</item>
<item name="android:divider">#00000000</item>
<item name="android:cacheColorHint">#00000000</item>
<item name="android:dividerHeight">0px</item>
</style>
<style name="MyDropDownNav" parent="Widget.Sherlock.Light.Spinner.DropDown.ActionBar">
<item name="android:textColor">#FFFFFF</item>
<item name="android:background">@drawable/actionbar_bg_shape</item>
<item name="android:popupBackground">@drawable/actionbar_dropdown_bg_shape</item>
<item name="android:dropDownSelector">@drawable/dropdown_nav_selector</item>
<item name="android:dropDownWidth">175dp</item>
<item name="android:dropDownHeight">50dp</item>
<item name="android:showDividers">none</item>
<item name="android:divider">@null</item>
<item name="android:cacheColorHint">#00000000</item>
<item name="android:dividerHeight">0px</item>
<item name="background">@drawable/actionbar_bg_shape</item>
</style>
<style name="Theme.Test.ICS" parent="Theme.Sherlock.Light">
<item name="android:actionDropDownStyle">@style/MyDropDownNav</item>
<item name="actionDropDownStyle">@style/MyDropDownNav</item>
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="actionBarStyle">@style/MyActionBar</item>
<item name="actionBarDivider">@drawable/icon</item>
<item name="android:actionBarDivider">@drawable/icon</item>
</style>
我也尝试过将分隔符属性更改为颜色或可绘制。但是下拉菜单导航中仍然存在分隔符,完全没有效果。任何想法都会非常有帮助。