进程间消息的传递和处理
文章平均质量分 89
临意
了解java,专注于android应用开发
展开
-
View的onInterceptTouchEvent(MotionEvent ev)和dispatchTouchEvent(MotionEvent ev) 解析
android中的事件类型分为按键事件和屏幕触摸事件,Touch事件是屏幕触摸事件的基础事件,有必要对它进行深入的了解。一个最简单的屏幕触摸动作触发了一系列Touch事件:ACTION_DOWN->ACTION_MOVE->ACTION_MOVE->ACTION_MOVE...->ACTION_MOVE->ACTION_UP当屏幕中包含一个ViewGroup,而这个ViewGroup又包含原创 2012-10-03 17:24:25 · 3122 阅读 · 2 评论 -
Messenger:使用消息的跨进程通信 (Message.replyTo()的使用)
Messenger:使用消息的跨进程通信 (Message.replyTo()的使用)原文链接:http://xwangly.iteye.com/blog/1109424Messenger:信使官方文档解释:它引用了一个Handler对象,以便others能够向它发送消息(使用mMessenger.send(Message msg)方法)。该类允许跨进程间基于Message的通信(即两转载 2012-10-02 15:15:29 · 11552 阅读 · 3 评论 -
ConditionVariable线程控制变量的使用
ConditionVariable有三个函数booleanblock(long timeout)Block the current thread until the condition is opened or until timeout milliseconds have passed.voidblock()Block the原创 2013-07-15 10:39:28 · 844 阅读 · 0 评论 -
HandlerThread的使用------Hander所在线程
HandlerThread主要用在给Handler开辟一个新的线程,HandlerThread有Looper对象,避免了继承Thread时对内部Looper进行设置。在HandlerThread主要使用两个方法:(1)getLooper()用来获取HandlerThread的Looper对象,用来初始化Handler对象。如果HandlerThread没有started或者isAlive()返原创 2013-07-21 10:53:47 · 1183 阅读 · 0 评论