首先,当一个down事件来临的时候,viewgroup的dispachTouchEvent中会清除所有的上一个手势的状态
// Handle an initial down. if (actionMasked == MotionEvent.ACTION_DOWN) { // Throw away all previous state when starting a new touch gesture. // The framework may have dropped the up or cancel event for the previous gesture // due to an app switch, ANR, or some other state change. cancelAndClearTouchTargets(ev); resetTouchState(); }
关于事件拦截调用的源码:
<