MapView with ViewPager2: Map Gestures not working

97 Views Asked by At

I have a ViewPager2 with 3 fragments. The last fragment contains a Mapview.

When I try to manipulate the map, the ViewPager2 gets triggered and takes me to another fragment.

This doesn't happen when I swipe up and down on the Map, I guess the ViewPager2 is not registered to receive up and down swipes.

I want it to be so that when the user manipulates the map, the viewpager2 doesn't register that gesture.

I have read similar questions here saying to overide the canScroll() but they only apply to ViewPager and not ViewPager2 as ViewPager2 doesn't have that method.

Please help.

0

There are 0 best solutions below