android onFling 事件没有用

引用:http://topic.csdn.net/u/20100917/23/d14fcc0b-e6a3-436f-8cc0-8bc6bdbc58f8.html

private GestureDetector mGestureDetector;

mGestureDetector = new GestureDetector(this); 

@Override  
public boolean dispatchTouchEvent(MotionEvent event) {  
if(mGestureDetector.onTouchEvent(event)){  
event.setAction(MotionEvent.ACTION_CANCEL);  
}  
return super.dispatchTouchEvent(event);  
}  

原文地址:https://www.cnblogs.com/sode/p/2320763.html