Tag: android-recyclerview

ava – How to create RecyclerView with multiple view type?

The Question : 905 people think this question is useful From https://developer.android.com/preview/material/ui-widgets.html When we create RecyclerView.Adapter we have to specify ViewHolder that will bind with the adapter. So, is it possible to create RecyclerView with multiple view types? The Question Comments : On top of Anton’s answer, see my answer here: stackoverflow.com/questions/25914003/… Check these link

java – How can I finish the ActionMode when no selected item?

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