这是学习笔记,以我看得明白为主。

分为 view.dispatchTouchEvent,---只有事件的处理逻辑

----- ViewGroup.dispatchTouchEvent---实现了分发流程的逻辑

事件接收流程

setView#ViewRootImpl.java 

//接收事件的方法

------> new WindowInputEventReceiver(inputChannel, Looper.myLooper());

[email protected]#WindowInputEventReceiver.java

------》enqueueInputEvent

-----------〉doProcessInputEvents

-----------------》stage.deliver(q); (InputStage stage;)有以下的种类

mSyntheticInputStage = new SyntheticInputStage();
InputStage viewPostImeStage = new ViewPostImeInputStage(mSyntheticInputStage);
InputStage nativePostImeStage = new NativePostImeInputStage(viewPostImeStage,
        "aq:native-post-ime:" + counterSuffix);
InputStage earlyPostImeStage = new EarlyPostImeInputStage(nativePostImeStage);
InputStage imeStage = new ImeInputStage
03-16 12:20