Android onTouchEvent and TouchListener 的执行流程

public boolean dispatchTouchEvent(MotionEvent event) {
	if (mInputEventConsistencyVerifier != null) {
		mInputEventConsistencyVerifier.onTouchEvent(event, 0);
	}

	if (onFilterTouchEventForSecurity(event)) {
		// noinspection SimplifiableIfStatement
		ListenerInfo li = mListenerInfo;
		if (li != null && li.mOnTouchListener != null
				&& (mViewFlags & ENABLED_MASK) == ENABLED
				&& li.mOnTouchListener.onTouch(this, event)) {
			return true;
		}

		if (onTouchEvent(event)) {
			return true;
		}
	}

	if (mInputEventConsistencyVerifier != null) {
		mInputEventConsistencyVerifier.onUnhandledEvent(event, 0);
	}
		return false;
}

所有,如果在注册的TouchListener中返回了true, 那么你自定义View中的onTouchEvent()方法就执行不到咯。ref: frameworks/base/core/java/android/view/View.java