Select and Unselect items in recyclerview without using any checkbox or radio button or etc.
- I want to select 1st recyclerview item on longclick and then all the other item on single click in recyclerview list.
- Unselect item on single click as well on recyclerview list.
UPDATE()
holder.itemView.setOnLongClickListener(View.OnLongClickListener {
if (selectedPosition == position) {
selectedPosition = -1
notifyItemChanged(position);
}
selectedPosition = position;
notifyItemChanged(position);}
After one long click i want to select and unselect item only on single click