Reputation: 91
So, I have a ViewPager2 with 4 fragments. Each fragment has a recyclerView with a horizontal scroll. Right now while I am scrolling the recyclerView items, the next fragment gets opened because of the swipe. How can I make it smoother so that scrolling recyclerView would not affect the tabs? (Setting viewPager.isUserInputEnabled = false is not an option though) What are your suggestions? Thanks in advance
Upvotes: 0
Views: 1529
Reputation: 91
Here's the ready custom class for that)) Check it out, it solved my issue https://github.com/android/views-widgets-samples/blob/master/ViewPager2/app/src/main/java/androidx/viewpager2/integration/testapp/NestedScrollableHost.kt
Upvotes: 0