我寫好了Demo。四個按鈕執行Handle的四個方法,覺得老師講的有點亂的可以去看看,最后,文明,謙遜。
Github:https://github.com/Omooo/HandleDemo
Github:https://github.com/Omooo/HandleDemo
2017-10-28
http://blog.csdn.net/junjianzhang/article/details/44998527
2017-09-27
主線程就是顯式創建looper的MyThread線程,UI線程就是activity;老師的第一個例子主要講了 在UI線程中發送一個message(thread.handler.sendEmptyMessage(1) ),然后在MyThread線程中通過handler處理,條件是MyThread線程必須手動創建一個looper對象,用來接收UI線程發送來的message,并通過輪詢的方式不斷的將messagequeue中的消息交給handler處理(handle message(msg))。
說的很亂,如有錯誤,請指正(微笑臉
說的很亂,如有錯誤,請指正(微笑臉
2017-09-26