I have a RecyclerView where each item is a linear layout (orientation vertical) with a text view and another horizontal RecyclerView. The expected behaviour would be that the user would be able to seamless change from vertical to horizontal scroll, but it appears if user tries to swipe horizontally while the vertical scroll is not entirely stopped (yet not visible move, just to swipe fast) or if the horizontal swipe starts somehow from a diagonal motion, the app keeps the vertical scroll and ignores the horizontal one. Is there a best practice on how to use a vertical recyclerview with horizontal recyclerview items? Tried to search for this a lot, but nothing seems to work.
Asked
Active
Viewed 150 times
1
-
1are you looking for this https://bladecoder.medium.com/fixing-recyclerview-nested-scrolling-in-opposite-direction-f587be5c1a04 – Raghunandan Jun 26 '21 at 15:53
-
yes, I giving it a try, thanks! – Alexandru Stefan Jun 26 '21 at 16:24
-
even with that workaround, the behavior is not perfect. I saw something like this working perfectly in flutter, still wondering how to achieve that in android – Alexandru Stefan Jun 27 '21 at 15:48
-
the person who posted that blog also has created a issue on issuetracker. hope its resolved by google – Raghunandan Jun 27 '21 at 16:02
-
https://issuetracker.google.com/issues/168716647?pli=1 link to the issue as well for easier reach in the future – Alexandru Stefan Jun 28 '21 at 09:19