I have a RecyclerView
with an ImageButton
and a TextView
. I implemented swiping with ItemTouchHelper.Callback
: the TextView
is moved to the right and the ImageButton
is flipped, showing a bin icon.
I want to be able to click on the ImageView
in order to confirm the removal of the element, but then the ViewHolder
comes back to its idle state.
I think it is because RecyclerView
captures the touchEvent and it does not reach the onClickListener
in the button. Any ideas?