The Question : 1 people think this question is useful I want to finish actionmode when there is no item selected. I tried the code below but it didn’t work. bookAdapter.setOnLongClickListener(new RecyclerViewAdapter.OnLongClickListener() { @Override public void onLongClick() { if(mActionMode != null) { if(bookAdapter.getSelectedBooks().isEmpty()) { mActionMode.finish(); } return; } ActionMode.Callback mActionModeCallback = new ActionMode.Callback() { @Override