android - How can I set my options menu up so that there are only 2 buttons per row? -


I was trying to set up my options menu so that 1 and the second row had 2 buttons and 1 button the third line But here is the code that I was trying to use, but I'm guessing the group ID reasoning that I did not think so.

  menu.add (1, MENU_NAME, 1, "by name"); Menu.add (1, MENU_NUMBER, 2, "By number"); Menu.add (2, MENU_POSITION, 1, "From Status"); Menu.add (2, MENU_COLLEGE, 2, "By College"); Menu.add (3, MENU_UPDATE, 1, "Update Roster");  

Perhaps it is resolved in some way with XML layout, but I'm not really good with layouts; (That's why I was not getting too far in this way.

I do not believe it is possible A maximum of 6 items can appear at a time from the menu, and they are always shown in maximum of 2 rows. The menu group is a way of referencing menu items in a way, they have no visual effects. See.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -