-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
position not retained when coming back from another fragment #68
Comments
@palicka I had the same issue, look my solution, hope it will helps
Where indicator - is indicator view, pager - is ViewPager, adapter - is PagerAdapter. Indicator internally react on adapter changes, so it will redraw indicators correctly. Hope it helps :) |
@VladPalamarchuk thank you :) it works, but it would great if it was on that position right away :) but your solution is better than nothing so thank you again 👍 |
This bug also occurs on screen rotation. |
This bug is still existing in version 4.1.2 |
Fixed in |
Hello, thanks for your contribution ! |
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:
The text was updated successfully, but these errors were encountered: