lightSky / InfiniteIndicator

This lib can be used for viewpager infinite loop with indicator easily.
486 stars 102 forks source link

嵌套在滚动视图(ScrollView ..)中,按住InfiniteIndicator控件滑动时松开会停止自动滚动 #30

Open xuwj opened 8 years ago

xuwj commented 8 years ago

修复方式:在InfiniteIndicator类的dispatchTouchEvent方法中某一段代码修改如下

if (isStopScrollWhenTouch) {
            if ((action == MotionEvent.ACTION_DOWN) && isAutoScroll) {
                isStopByTouch = true;
                stop();
            } else if ((ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_CANCEL)&& isStopByTouch) {
                start();
            }
        }
lightSky commented 7 years ago

感谢你的反馈,这个应该是ScrollView拦截了事件导致,你可以提个PR ^_^