I'm developing an application that has a list in RecyclerView
and the idea is for the person to choose one or more products from this list and change color to show that it is selected, but in case the person chooses the wrong one, a double click. I was able to make it work by using setOnClickListener
in the viewHolder, so when I select some product it changes color. I tried to also call setOnLongClickListener
until it works, I tried with two different corres, but it is not so easy to use, if you have how to configure to change the time of the long Click can be an option too. If someone has some example of how to implement the onClick function in another class, or if there is already a class I can use. Any information can be helpful. Thank you