In onOptionsItemSelected... I saw some code that are different in the switch block.
Case 1 (Normally seen)
public boolean onOptionsI
When I used Android Studio to generate a generic app, the template code for onOptionsItemSelected() returns true if item consumed otherwise it passes the call onto the super class.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_mymenuaction) {
return true;
}
return super.onOptionsItemSelected(item);
}