Closed
Description
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