A powerful, customizable and extensible ViewPager indicator framework. As the best alternative of ViewPagerIndicator, TabLayout and PagerSlidingTabStrip —— 强大、可定制、易扩展的 ViewPager 指示器框架。是ViewPagerIndicator、TabLayout、PagerSlidingTabStrip的最佳替代品。支持角标,更支持在非ViewPager场景下使用(使用hide()、show()切换Fragment或使用setVisibility切换FrameLayout里的View等),http://www.jianshu.com/p/f3022211821c
修改代码如下:
//measureWidth(int widthMeasureSpec) 方法
case MeasureSpec.UNSPECIFIED: if (mCircleCount <= 0) { result = getPaddingLeft() + getPaddingRight(); } else { result = (mCircleCount - 1) mMinRadius 2 + mMaxRadius 2 + (mCircleCount - 1) mCircleSpacing + getPaddingLeft() + getPaddingRight(); } break;
// 刷新方法 public void notifyDataSetChanged() { prepareCirclePoints(); // invalidate(); requestLayout(); }