What is orderInCategory in ActionBar menu item & why it is use for..?

后端 未结 3 829
甜味超标
甜味超标 2020-12-02 14:20

Im working on action menu item and its over flow item this is my main_menu.xml




        
3条回答
  •  感情败类
    2020-12-02 14:51

    android:orderInCategory Higher value, lower priority.

    I have a Activity and a Fragment in it, both of them have option menu, and the item numbers are 1 and 3.

    If I set android:orderInCategory=0, the activity menu are above the fragment menu, same effect before I set the value.

    But if I set android:orderInCategory=1,the activity menu are below the fragment menu, and that is what I want.(I also test android:orderInCategory=5 tested too, still the same effect.)

提交回复
热议问题