KillAndEat
KillAndEat

Reputation: 103

Scroll inside RecyclerView item

I have a vertical RecyclerView and inside every item a custom view with own horizontal scroll and scale. When I try to scroll view inside item I get scroll conflict RecyclerView interrupts touch event and tries to move the list.

How can I restrict RecyclerView to handle horizontal swipe event?

I tried to interrupt event via RecyclerView.OnItemTouchListener and pass them directly to my custom view. That almost works but sometimes I get wrong events and scroll in the custom view does not work.

Has someone else faced this problem?

Upvotes: 0

Views: 173

Answers (1)

Tiberal
Tiberal

Reputation: 420

Try use simple OnTouchListener instead OnItemTouchListener

Upvotes: 1

Related Questions