1

I have an ActionBar with overflow menu items. Each item's onClick starts an Activity using an Intent. In some devices, the item text disappears and the menu remains stuck until the activity opens.

I think that it waits for the Activity to open. Is there anyway to force the overflow menu to close immediately instead of seeing the menu with an empty text entry?

Siddharth Lele
  • 27,623
  • 15
  • 98
  • 151
youssefhassan
  • 1,067
  • 2
  • 11
  • 17

1 Answers1

3

I had the same error, what solved this for me is really simple: close the menu :)

  @Override
    public boolean onMenuItemSelected(int featureId, MenuItem item) {

        closeOptionsMenu();

        .....
        .....        
        .....
        return .....;
    }