Can anyone help me figure out why my OptionsMenu won't show up?

80 views Asked by At

I am using tabs, with Activity groups in each. I want to add an options menu to certain activities but it won't show on any. I have options menus working in other projects with the exact same code, so I can't figure out why they won't show up. This is the code I am using:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    menu.add("Option 1");
    menu.add("Option 2");
    menu.add("Option 3");
    return super.onCreateOptionsMenu(menu);
}

Is there anything wrong with this code or anywhere else I should be looking at that might be blocking this menu from showing when I hit the menu button?

1

There are 1 answers

0
user432209 On BEST ANSWER

The only thing that would be blocking the menu AFAIK would be if you are overriding onKeyDown. Make sure you aren't overriding that method and thus preventing the menu button from doing what it is supposed to.