I want to call onCreateOptionsMenu from code, because if I use:
menu.setGroupEnabled(0, false);
WITH
public Menu menu; public boolean onCreateOptionsMenu(Menu menu) { this.menu = menu; menu.add(0,0,0,"Option"); return true; }
This does not work if the user has never pressed the menu button. How can i do this?
thanks
PS: If this is bad practice let me know
source share