解决方案 »

  1.   

    @Override
        public boolean onInterceptTouchEvent(MotionEvent ev) {
            mGestureDetector.onTouchEvent(ev);
            return false;
        }private class MyGestureDetector extends GestureDetector.SimpleOnGestureListener {
       @Override
       public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY){
       //在这里获取距离     
       }
    }mGestureDetector = new GestureDetector(mContext.getApplicationContext(),
                    new MyGestureDetector(), null, false);
      

  2.   

    或者重写
    onTouchEvent方法也不错。