After I choose a specific option from my menu, I want the menu to stay on screen and not to disappear. That means, in the code below, after I do something if the item id is R.id.undo
, I want the menu to stay on screen.
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.undo:
// do something
break;
case R.id.clear:
// do something
break;
default:
return super.onOptionsItemSelected(item);
}
return true;
}