你好android開發者, 我知道這個問題已經被問了很多次了,我也嘗試了很多解決方案,但他們不適合我。 首先,我使用動作欄sherlock庫來顯示動作欄,並且我想在菜單項與圖標之間僅顯示分隔符。 爲此,我創建了顯示分隔線的自定義樣式,但未顯示。ActionBarsherlock如何在菜單項上設置分隔符只有圖標
<style name="Theme.SherlockCustom" parent="@style/Theme.Sherlock.Light">
<item name="android:actionBarDivider">@drawable/actionbar_seprator</item>
<item name="android:showDividers">middle</item>
</style>
而且還試圖更新的ActionBar福爾摩斯庫ActionMenuItemView.java其中needsDividerBefore()總會給真。但是這個補丁也不適合我。請幫助我出錯的地方。謝謝。
您可能正在試用Android 4.0以上的設備。您提到的修補程序僅適用於Android <3.0,因爲在更高版本中使用了本地操作欄實現,您無法修改。 – 2013-04-10 13:13:17
@matthias噸謝謝。現在我明白我要去哪裏錯了。你可以請建議如何在android> 4.0中獲得分隔符。有沒有解決方案。 – Dory 2013-04-10 14:06:04