How to change the selected recyclerview item position to the first position and background colour
here I change the selected item position and set that item to the first position init
var selectedItemPos = -1
holder.itemView.setOnClickListener {
selectedItemPos = position
Collections.swap(dataset,0,position)
notifyDataSetChanged()
}
if (selectedItemPos == position)
holder.itemView.setBackgroundColor(Color.parseColor("#200f726b"))
else...