I want the items in a RecyclerView to have touch feedback or ripples when pressed, but they seem to not be working, and I think it\'s because of the checkbox.
The ri
In your onClick method (assuming in your callback), make sure you do not call notifyDataSetChanged()
after notifyItemChanged(position)
.
notifyDataSetChanged() will conflict with those default ripple effects.
new recyclerAdapter.ClickListener() {
@Override
public void onClick(int position) {
... awesome item onClick code ...
notifyItemChanged(position);
//notifyDataSetChanged(); /--- Causes the no ripple bug
}
};