How to change the position of menu items on actionbar

后端 未结 4 1129
无人共我
无人共我 2021-02-07 14:51

I\'m developing one application in which I have to add a custom layout on actionbar. Adding the custom layout is done, but when I\'m adding the menu items on actionbar my custom

4条回答
  •  离开以前
    2021-02-07 15:15

    One way to achieve it is by calling invalidateOptionMenu and in the onCreateOptionsMenu method, put the items according to the order you wish to put them.

    BTW, if you use ActionBarSherlock, this method is available , so ignore the Lint warnings about it.

提交回复
热议问题