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

你的框架有点小Bug,看看 #2

Closed
angelen10 opened this issue Mar 4, 2015 · 2 comments
Closed

你的框架有点小Bug,看看 #2

angelen10 opened this issue Mar 4, 2015 · 2 comments

Comments

@angelen10
Copy link

它自动轮播的效果很棒~但是有一个小bug:比如说它轮播到第2页的时候,我手动滑到第3页,此时在3页的它会很快就自动滑到第4页(比设定的事件要快),这个怎么解决?

@bingoogolapple
Copy link
Owner

mViewPager.setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
               stopAutoPlay();
               break;
            case MotionEvent.ACTION_UP:
                startAutoPlay();
                break;
           }
        return false;
   }
});

processAutoPlay方法中上面那段代码就是处理手动滑动时停止和开始自动轮播的,没起效果?

@angelen10
Copy link
Author

@bingoogolapple 噢是我大意了,解决问题了~~现在打算使用UIL来结合你的框架来加载和缓存图片~

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