1
I’m developing an app that has a list in a RecyclerView
and the idea is that the person chooses one or more products from that list and changes color to show that it is selected, but in case the person chooses wrong, it gives a double click. I was able to make it work using one setOnClickListener
in viewHolder, then when I select some product it changes color. I tried calling too setOnLongClickListener
even works, I tested with two different races, but it is not so easy to use, if you have how to configure to change the Long Click time can be an option as well. If someone has an example of how to implement the onClick function in another class, or if there is already a class I can use. Any information may be useful. Obligatory
You can explain it better. I don’t understand why you want the double click. Usually the first click selects, if you have made a mistake click again and de-selects.
– ramaral
Yes, you understood right. So it is also a good option, as I check if it was clicked to not select, I do it with setOnClickListener same?
– Marcos Max
Depends on how you’re doing to select.
– ramaral