Search code examples
android-recyclerviewandroid-tablayoutmotionevent

Tablayout with recyclerview not swipeable on items


I'm using a tablayout with 3 fragments, each fragment has its own recyclerview. When trying to swipe from a fragment on a item the tablayout doesn't change tabs. I probably have to override a certain motionevent, but I don't know how.

I hope someone has the answer to this!

Thanks in advance.


Solution

  • It appears that when you are using a RelativeLayout in the layout that you are inflating the swiping part doesn't work. After changing this to a LinearLayout it solved the problem!