w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to change order of action bar menu items

You have not set an order to your Submenu when you call:

SubMenu submenus = menu.addSubMenu("SORT");

Take a look through docs for menu. Then take some time to look into the getOrder()

Since they have set constants you should use for your order, not just 1 as you did with your CREATE MenuItem you should really read that first.

You should call: addSubMenu(int, int, int, CharSequence)

Example (I have not tried this):

SubMenu submenus = menu.addSubMenu(2,2,2,"SORT");





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.