Open yswheye opened 7 years ago
I have same issue. +1
I wrote this code to LoopViewPager.java:
public void next() {
if (getCurrentItem() == mAdapter.getCount() - 1) {
mPopulatePending = true;
setCurrentItemInternal(0, true, true, -15000); // velocity is hard-coded
ViewCompat.postInvalidateOnAnimation(this);
} else {
setCurrentItem(getCurrentItem() + 1, true);
}
}
Call:
mLoopViewPager.next();
It seems working. but the code has not been fully tested.
UPDATED(2017-08-03): I fixed a bug that it working only items <= 3(but it depends on page settings).
How to scroll from last to first by code