on setoncliclistener by index?
I have a vertical linear recyclerview. When I click to an item I set a back color to clicked item after that when I click another item I want to delete color if old item
NotifyItemChanged()
Use an global variable in recycler view and set it's value to -1.in onclick assign your position to the variable And in bindviewholder write an if else loop to check is it = position or not if yes change your item color
Обсуждают сегодня