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

Dots indicator initialises with the wrong number of dots initially #20

Closed
createS0ftware opened this issue Dec 4, 2018 · 10 comments
Closed
Labels

Comments

@createS0ftware
Copy link

I have 2 items in my viewpager and the dots indicator initialises with 3 dots

I can't see why - but if is set the viewpager to the second page then it initialises with 2 dots.

i think the problem is that in refreshDots() you call buildDot which adds a child view (dot) to the layout - if dotIndicatorView is not initialised.

You need to remove this view after you find that the viewpager adapter has pages - in that same refreshDots() method

@createS0ftware createS0ftware changed the title Dots indicator initialises with the wrong number of dots Dots indicator initialises with the wrong number of dots initially Dec 4, 2018
@createS0ftware
Copy link
Author

createS0ftware commented Dec 4, 2018

Hmmm.. i just checked the code again - looks like i have a different version than what is in the maven rep... You removed that code. Ok i will try to get that version. You obviously fixed this bug.

@createS0ftware
Copy link
Author

Oh actually the problem is in SpringDotsIndicator. I was looking in DotsIndicator. So this is still a problem.

@GalatiaPar
Copy link

GalatiaPar commented Jan 10, 2019

This problem is also existent on the WormDotsIndicator too. Any updates on this?

@tommybuonomo
Copy link
Owner

Hello @createS0ftware and @GalatiaPar,

I can't reproduce the bug of the three dots instead of two.

Does the new release 3.0.2 fix the issue ?

@GalatiaPar
Copy link

GalatiaPar commented Jan 24, 2019

Hi @tommybuonomo. Not really.

I can see a different issue arising depending on the case:

  • Set up the view pager on the WormDotsIndicator as soon as you retrieve the list info you want to swipe through and list is empty. In this case it shows only one dot, which stays there no matter if you have updated the data (can provide video)
  • Setup the view pager on the WormDotsIndicator, if and only if I have a non-empty list, in which case when the containers of the list are 2, I get 3 dots instead of 2. The first dot seems to be excess, as it goes away on the first swipe I do.

I hope this helps. If you need any more clarifications please do not hesitate to ask!

tommybuonomo added a commit that referenced this issue Jan 24, 2019
@tommybuonomo
Copy link
Owner

@GalatiaPar can you check now with 3.0.3 please ?

@GalatiaPar
Copy link

@tommybuonomo all seems to be working well! thank you! Keep up the great work 👍

@createS0ftware
Copy link
Author

I'll check it in the next few hours

@createS0ftware
Copy link
Author

Fixed !! Well done !! Thanks !!

@bhaskarraj
Copy link

I am still facing the same problem with the wrong number of dots in 3.0.3

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