读书人

Message,MessageQueue,Looper,Handler

发布时间: 2012-08-22 09:50:35 作者: rapoo

Message,MessageQueue,Looper,Handler详解+实例(转载)

http://www.eoeandroid.com/viewthread.php?tid=49595&highlight=handler


一、几个关键概念

1、MessageQueue:是一种
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ? androidMessage,MessageQueue,Looper,Handler详解+范例(转载)rientation="vertical"
? ? android:layout_width="fill_parent"
? ? android:layout_height="fill_parent"
? ? >
<TextView??android:id="@+id/view_01"
? ? android:layout_width="fill_parent"
? ? android:layout_height="wrap_content"
? ? android:text="@string/? ? android:layout_width="fill_parent"
? ? android:layout_height="wrap_content"
? ? android:text="测试消息" />
</LinearLayout>

1 楼 greenboy1 2010-12-16 我在测试Handler的时候发现,当主线程往子线程发送消息的时候,是一个死循环。不知道是什么原因?

读书人网 >移动开发

热点推荐