So in the the old ViewPager, you could set the initial position of the ViewPager using
viewPager.setCurrentItem(x)
How do you do that in ViewPager2?
setCurrentItem is also an API on ViewPager2, so you should use that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With