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

Dot indicator moves to wrong position #25

Closed
GalatiaPar opened this issue Jan 25, 2019 · 4 comments
Closed

Dot indicator moves to wrong position #25

GalatiaPar opened this issue Jan 25, 2019 · 4 comments
Assignees
Milestone

Comments

@GalatiaPar
Copy link

In my case I have a view pager adapter and every item is clickable opening another activity. In my list I only have 2 items. When I swipe to the second, click on it (opens the activity), and then finish the activity, the dots show wrong. While, it should show the second as selected, it shows the first one as selected.

@abrahamturing
Copy link

I am not sure but my situation might also be related. When I add a new page to the view pager, the indicator shows up an extra dot, but the selected dot moves to the first one. When I change the page, it corrects itself.

IMO, the problem seems to originate from setUpDotsAnimators. Why do you remove the listener and add it again if a listener already exists? The following call moves the selected dot to the beginning, IMHO:

this.pageChangedListener.onPageScrolled(0, 0.0F, 0);

abrahamturing pushed a commit to abrahamturing/dotsindicator that referenced this issue Mar 22, 2019
@tommybuonomo
Copy link
Owner

Hi @GalatiaPar @abrahamturing,
Can you please try with the last version 4.0 ?
Thanks

@RahulSDeshpande
Copy link

RahulSDeshpande commented Sep 24, 2019

In my case I have a view pager adapter and every item is clickable opening another activity. In my list I only have 2 items. When I swipe to the second, click on it (opens the activity), and then finish the activity, the dots show wrong. While, it should show the second as selected, it shows the first one as selected.

Yes!! I am too facing this issue.

I have 3 items in my VIewPager, but 1st dot is in selected mode all the time.

Cheers !!

@tommybuonomo
Copy link
Owner

Duplicate of #139

@tommybuonomo tommybuonomo marked this as a duplicate of #139 Apr 30, 2022
@tommybuonomo tommybuonomo self-assigned this Apr 30, 2022
@tommybuonomo tommybuonomo added this to the 4.3 milestone Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants