Pages

28 July 2016

Centering Circles Problem in CirclePageIndicator

ViewPagerIndicator library fits well the need of indicator circles for sliding views. But there is micro level bug in library; it cannot align circles center vertically; then there is a slight cut top of circles.It is really difficult to notice, take a look closer. :)

The red line is border of CirclePageIndicator View; it cuts the circles
CirclePageIndicator has boolean centered attribute but it doesnt work expected, instead I used 2dp padding top to shift the circles below. It worked well.

But I wish I had time to fork and fix this issue and make a pull request in github.

https://github.com/JakeWharton/ViewPagerIndicator/blob/master/library/src/com/viewpagerindicator/CirclePageIndicator.java#L58

After simply adding padding 2dp to top, quite satisfactory