android / views-widgets-samples

Multiple samples showing the best practices in views-widgets on Android.
Apache License 2.0
5.03k stars 3.01k forks source link

ViewPager2 remains between two fragments if isUserInputEnabled = false during the swipe #205

Closed Ifans007 closed 3 years ago

Ifans007 commented 3 years ago

in my case ViewPager2 has a vertical orientation after isUserInputEnabled = false during the swipe, ViewPager2 remains as in the screenshot and doesn't move anywhere attempts to set setCurrentItem or program scrolling do nothing

screenshot

Ifans007 commented 3 years ago

use only view_pager2.setCurrentItem(view_pager2.currentPosition, false)

image