初始时,手势向左边滑动图片,无法向左边循环
ysemylord opened this issue · comments
添加如下方法并调用,皆可以了
/**
* 解决当positoin为0使无法左滑的bug
*/
public void fixLeftCycle(){
int bigValue = Integer.MAX_VALUE/2;
int allCount = infinitePagerAdapter.getRealCount();
simpleViewPager.setCurrentItem( (bigValue + bigValue % allCount)/ allCount);
}
很好的解决方法