WEB开发网
开发学院手机开发Android 开发 Android事件处理 阅读

Android事件处理

 2010-05-31 14:39:00 来源:WEB开发网   
核心提示:readEvent(ev);send = preprocessEvent(di, ev);addLocked(di, curTime, ev.flags, ..., me);}}};Thread mThread = new Thread("InputDeviceReader") { public v

readEvent(ev);

send = preprocessEvent(di, ev);

addLocked(di, curTime, ev.flags, ..., me);

}

}

};

Thread mThread = new Thread("InputDeviceReader") { public void run() { android.os.Process.setThreadPriority( android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY); try { RawInputEvent ev = new RawInputEvent(); while (true) { InputDevice di; readEvent(ev); send = preprocessEvent(di, ev); addLocked(di, curTime, ev.flags, ..., me); } } };

输入事件分发线程

在frameworks/base/services/java/com/android/server/WindowManagerService.java里创建了一个输入事件分发线程,它负责把事件分发到相应的窗口上去。

Java代码 < width="14" height="15" src="http://janla.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://www.macromedia.com/go/getflashplayer">

mQueue.getEvent

dispatchKey/dispatchPointer/dispatchTrackball

上一页  2 3 4 5 6 7 

Tags:Android 事件 处理

编辑录入:coldstar [复制链接] [打 印]
赞助商链接