Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初始时,手势向左边滑动图片,无法向左边循环 #9

Open
ysemylord opened this issue Feb 13, 2017 · 2 comments
Open

Comments

@ysemylord
Copy link

No description provided.

@ysemylord
Copy link
Author

添加如下方法并调用,皆可以了
/**
* 解决当positoin为0使无法左滑的bug
*/
public void fixLeftCycle(){
int bigValue = Integer.MAX_VALUE/2;
int allCount = infinitePagerAdapter.getRealCount();
simpleViewPager.setCurrentItem( (bigValue + bigValue % allCount)/ allCount);
}

@cpacm
Copy link
Owner

cpacm commented Feb 22, 2017

很好的解决方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants