waylife / InfiniteViewPager

InfiniteViewPager is a modified android ViewPager widget that allows infinite paging and auto-scrolling.
MIT License
281 stars 47 forks source link

CirclePageIndicator at the last item go to empty before jump to the first item #4

Open vsay01 opened 8 years ago

vsay01 commented 8 years ago

Hi,

Great library,

I setup the demo sample, and I notice that for LinePageIndicator when transition from first to last or last to first it didn't jump to the empty spot.

However, for the CirclePageIndicator when transition from first to last or last to first it jumps to the empty spot first before move to fist or last.

Is there anyway we can make it smooth without go to empty spot for CirclePageIndicator?

Thank

cp140521 commented 7 years ago

Can be amended to solve, modify the CirclePageIndicator onDraw () method in the 272 lines of code: if (!mSnap) { if(mCurrentPage != count - 1) { cx += mPageOffset * threeRadius; } }