InfiniteViewPager icon indicating copy to clipboard operation
InfiniteViewPager copied to clipboard

手指按下,再抬起,不会自动滚动

Open luvictor opened this issue 10 years ago • 1 comments

// 代码修改成如下就能满足需求
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { // to solve conflict with parent ViewGroup getParent().requestDisallowInterceptTouchEvent(true); if (this.mAutoScroll || this.mTouchedWhenAutoScroll) { int action = ev.getAction(); switch (action) { case MotionEvent.ACTION_DOWN: this.mTouchedWhenAutoScroll = true; stopAutoScroll(); break; case MotionEvent.ACTION_UP:// 手指抬起后,继续滑动 this.mTouchedWhenAutoScroll = false; startAutoScroll(); break; } } return super.onInterceptTouchEvent(ev); }

luvictor avatar May 05 '16 02:05 luvictor

@luvictor 可提交pull request,这样你也可以成为贡献者. 另外,这个问题之前处理过,在什么场景下还会出现你说的的这个问题呢?

waylife avatar May 06 '16 16:05 waylife