@Override
  public boolean onOptionsItemSelected(MenuItem item) {
    if (item.getItemId() == R.id.how_it_works) {
      displayHowItWorksInstructions();
      return true;
    } else if (item.getItemId() == R.id.switch_ui_mode) {
      switchUiMode();
      return true;
    } else if (item.getItemId() == R.id.settings) {
      showSettings();
      return true;
    }
    return super.onOptionsItemSelected(item);
  }
Invoked when a context menu/action bar item is clicked/tapped.

@return {@code true} if the event was consumed, {@code false} otherwise.
java/com/google/android/apps/authenticator/AuthenticatorActivity.java