@Override public void onDestroyActionMode(ActionMode mode) { adapter.setSelectionMode(false); // Set status bar color back to normal. getActivity() .getWindow() .setStatusBarColor(ContextCompat.getColor(getActivity(), R.color.colorPrimaryDark)); adapter.clearSelections(); actionMode = null; recyclerView.setSwipe(true); }
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { mode.getMenuInflater().inflate(R.menu.recent_action_mode, menu); recyclerView.setSwipe(false); adapter.setSelectionMode(true); // Change status bar color to be dark to correspond to dark toolbar color. getActivity() .getWindow() .setStatusBarColor(ContextCompat.getColor(getActivity(), R.color.grey900)); return true; }