-
Notifications
You must be signed in to change notification settings - Fork 360
Closed
Description
Hi, I use navigation graph in my app and when I leave fragment which contains viewpager and come back (click on "skip" button in attached gif), viewpager's position is retained, but dots indicator is reset. I know that view is recreated when leaving and coming back, but I noticed ViewPager2.OnPageChangeCallback's onPageSelected is called with last position, but dots indicator somehow doesn't react. But when I scroll , indicator jumps to correct position. Please have a look at attached video. Thanks

this is how it's initialised in onActivityCreated() method:
val pagerAdapter = MyViewPagerAdapter(activity!!)
viewPager.adapter = pagerAdapter
pagerIndicator.setViewPager2(viewPager)
Reactions are currently unavailable