android:orderInCategory is an integer attribute that dictates the order in which the menu items will appear within the menu when it is displayed.
<menu
xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/menu_item_first"
android:orderInCategory="1"
android:showAsAction="never"
android:title="@string/string_one"/>
<item
android:id="@+id/menu_item_second"
android:orderInCategory="2"
android:showAsAction="never"
android:title="@string/string_two"/>
</menu>
-
Menu items in
ToolBarare arranged fromlefttoright(or
starttoendin RTL mode) in the ascending order (i.e. 1,2,3->
left to right).
-
Menu Items in
Overflow menuare arranged fromtoptobottomin
the ascending order (i.e. 1,2,3->top to bottom).