Swipe/Fling tab-changing in conjunction with ScrollView?

后端 未结 3 1821
栀梦
栀梦 2020-12-02 10:03

The best I could find on this particular issue (although I do not use a Gallery): ScrollView and Gallery interfering - doesn\'t really give a specific answer though. And my

3条回答
  •  一个人的身影
    2020-12-02 10:56

    For what it's worth, I found the onFling method very unreliable. I override the onScroll method in the SimpleGestureDetector, and define my onInterceptTouchEvent as:

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        //Call super first because it does some hidden motion event handling
        boolean result = super.onInterceptTouchEvent(ev);
        if (this.mGestureScanner.onTouchEvent(ev)) return true;
        return result;
    }
    

提交回复
热议问题