找回密码
 立即注册
输入InputManager事情input | android开发 2022-11-09 63 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
在Android使用程序中,有一类特别的消息,是专门担任与用户进行交互的,它们就是接触屏和键盘等输入事情。接触屏和键盘事情是统一由系统输入管理器InputManager进行分发的。也就是说,InputManager担任从硬件接收输入事情,然后再将接收到的输入事情分发当时激活的窗口管理。此外,InputManager也能接收模拟的输入事情,用来模拟用户接触和点击等事情。当时激活的窗口所运行在的线程接收到InputManager分发过来的输入事情之后,会将它们封装成输入消息,然后交给当时获得焦点的控件管理。这个PPT讲Android使用程序输入事情的分发和管理进程,主要涉及到输入管理InputManager、输入事情监控线程InputReader、输入事情分发线程InputDispatcher,以及使用程序主线程消息循环。

(In the Android user program, there is a special kind of message that is specially used to interact with users. They are touch screen, keyboard and other input things. The touchscreen and keyboard events are uniformly distributed by the system input manager InputManager. In other words, the InputManager is responsible for receiving input events from the hardware, and then distributing the received input events to the active window management. In addition, Input Manager can also receive simulated input events to simulate user contact, click and other events. After the thread running the activated window receives the input events distributed by the InputManager, it will encapsulate them into input messages and then give them to the control that gets the focus at that time for management. This PPT talks about the distribution and management process of Android using programs to input events, mainly involving input management InputManager, input event monitoring thread InputReader, input event distribution thread InputDispatcher, and using the main thread message loop of the program.)

[下载]10381218239.rar




上一篇:Android硬件抽象层(HAL)
下一篇:Dalvik虚拟机