Skip to content
This repository was archived by the owner on Apr 19, 2018. It is now read-only.

Commit 4b78425

Browse files
committed
Fixed that measureLong was inaccurate.
1 parent 578f2b6 commit 4b78425

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/src/main/java/com/viewpagerindicator/CirclePageIndicator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ private int measureLong(int measureSpec) {
481481
//Calculate the width according the views count
482482
final int count = mViewPager.getAdapter().getCount();
483483
result = (int)(getPaddingLeft() + getPaddingRight()
484-
+ (count * 2 * mRadius) + (count - 1) * (mRadius + mGap));
484+
+ (count * (2 * mRadius + 1)) + (count - 1) * (mRadius + mGap));
485485
//Respect AT_MOST value if that was what is called for by measureSpec
486486
if (specMode == MeasureSpec.AT_MOST) {
487487
result = Math.min(result, specSize);

0 commit comments

Comments
 (0)