I'm using the new ViewPager2
in a project and I need to disable the swipe action. Have to restrict the user to change tabs only pressing the TabLayout
buttons.
With the default ViewPager
you can achieve this by making your custom ViewPager
and Override
the onTouchEvent
method but this is not an option for ViewPager2
because it's final and you can't inherit it.
Before changing back to ViewPager
I wanna know if is there any way to do this using ViewPager2