<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_filter"
android:icon="@drawable/arrows_sync_icn"
android:orderInCategory="102"
android:title="Filter"
app:showAsAction="always"
>
<menu>
<group android:id="@+id/group_1">
<item
android:id="@+id/action_latest_story"
android:title="Latest stories"
/>
</group>
<group android:id="@+id/group_2">
<item
android:id="@+id/action_most_liked"
android:title="Most liked"
/>
</group>
<group android:id="@+id/group_3">
<item
android:id="@+id/action_most_shared"
android:title="Most shared"
/>
</group>
<group android:id="@+id/group_4">
<item
android:id="@+id/action_most_read"
android:title="Most read"
/>
</group>
</menu>
</item>
<item
android:id="@+id/action_notification"
android:actionLayout="@layout/lyt_notification_count"
android:icon="@drawable/notification_navigation"
android:orderInCategory="101"
android:title="Notification"
app:showAsAction="always" />
<item
android:id="@+id/action_search"
android:icon="@drawable/search_navigation"
android:orderInCategory="100"
android:title="Search"
app:actionViewClass="android.widget.SearchView"
app:showAsAction="always" />
</menu>
所以这就是我现在正在做的事情。我需要在每个项目之间绘制一个项目分隔符(Orderincatogory = 102)。如果有人知道答案,我不知道怎么做,请帮忙。这些都在工具栏中,我正在使用kitkat和lollypop设备进行测试。