change MenuItem visibility when clicked
问题 I'm trying to hide one MenuItem and make another visible when the first is selected. The ID's for each are: pencil: R.id.button_routines_edit check mark: R.id.button_routines_edit_done Here the relevant code: private boolean isEditing = false; @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection switch (item.getItemId()) { case R.id.button_routines_edit: // hide pencil icon, show checkmark isEditing = true; return true; case R.id.button_routines_edit_done: