I have a RecyclerView
and I would like to allow users to select views using a long press. This works fine except that the ripple effect is terminated as soon as I call either notifyItemChanged()
or notifyDataSetChanged
in order to indicate the selection. How can I prevent this from happening?
Note, this question has been asked before (Example 1, Example 2). The answer to those questions has been to use notifyItemChanged
instead of notifyDataSetChanged
. I have tried both of these and it does not change the behavior for me.