Skip to content
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

Invalid indicator position using ViewPager2 #80

Closed
Magno-Ramos opened this issue Mar 11, 2020 · 4 comments
Closed

Invalid indicator position using ViewPager2 #80

Magno-Ramos opened this issue Mar 11, 2020 · 4 comments
Assignees
Labels
Milestone

Comments

@Magno-Ramos
Copy link

I'm using ViewPager2.

When I setCurrentItem to ViewPager2 with smoothScroll=false, the indicator remains at the start position and not at the correct ViewPager2 position

@MaximilianFrick
Copy link

Have the same problem :/
with smoothScroll=true it is working

@AGENTxXx
Copy link

You need add delay before set current page. My decision
Handler(Looper.getMainLooper()).postDelayed({ binding.dotsIndicator.refreshDots() }, 50)

It's becase dots have not received coordinates yet and pos = 0,0 for any page. We need to wait, while they are drawn on the canvas

@tommybuonomo
Copy link
Owner

Fixed in 4.3

@tommybuonomo tommybuonomo added this to the 4.3 milestone Apr 30, 2022
@tommybuonomo tommybuonomo self-assigned this Apr 30, 2022
@tommybuonomo
Copy link
Owner

Hello, thanks for your contribution !
This issue is now fixed in the new version 4.3
Thanks 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants