[問題] handeler VS method 改UI thread的差異?
我們都知道要開一個thread去改UI的話是不行的,需要用handler機制把thread用
sendmessage的方式回call main thread的handle message才能修改
這邊有個疑問是
這樣跟直接用method在main thread中修改UI有什麼差異呢?
因為用handler新開的thread雖然是在後台跑
但是回call回來還是block住main thread不是嗎? 這樣跟用method有什麼不同呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 124.219.31.93
※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1426841969.A.79C.html
→
03/20 17:07, , 1F
03/20 17:07, 1F
→
03/20 17:28, , 2F
03/20 17:28, 2F
→
03/20 17:28, , 3F
03/20 17:28, 3F
→
03/20 19:42, , 4F
03/20 19:42, 4F
→
03/20 19:43, , 5F
03/20 19:43, 5F
→
03/20 19:47, , 6F
03/20 19:47, 6F
→
03/20 19:47, , 7F
03/20 19:47, 7F
推
03/20 20:32, , 8F
03/20 20:32, 8F
→
03/20 20:32, , 9F
03/20 20:32, 9F
→
03/20 20:33, , 10F
03/20 20:33, 10F
→
03/20 20:43, , 11F
03/20 20:43, 11F
→
03/20 20:47, , 12F
03/20 20:47, 12F
→
03/20 20:48, , 13F
03/20 20:48, 13F
→
03/20 20:48, , 14F
03/20 20:48, 14F
→
03/20 20:49, , 15F
03/20 20:49, 15F
→
03/20 20:51, , 16F
03/20 20:51, 16F
→
03/20 20:51, , 17F
03/20 20:51, 17F
→
03/20 20:52, , 18F
03/20 20:52, 18F
→
03/20 21:57, , 19F
03/20 21:57, 19F
→
03/20 21:57, , 20F
03/20 21:57, 20F
→
03/20 21:57, , 21F
03/20 21:57, 21F
→
03/20 21:57, , 22F
03/20 21:57, 22F
→
03/20 21:58, , 23F
03/20 21:58, 23F
→
03/20 21:58, , 24F
03/20 21:58, 24F
→
03/20 21:58, , 25F
03/20 21:58, 25F
→
03/20 21:58, , 26F
03/20 21:58, 26F
→
03/20 22:00, , 27F
03/20 22:00, 27F
→
03/20 22:26, , 28F
03/20 22:26, 28F
→
03/20 22:33, , 29F
03/20 22:33, 29F
→
03/22 03:10, , 30F
03/22 03:10, 30F
→
03/23 18:08, , 31F
03/23 18:08, 31F
→
03/23 18:08, , 32F
03/23 18:08, 32F
→
03/23 18:08, , 33F
03/23 18:08, 33F
→
03/23 18:08, , 34F
03/23 18:08, 34F
→
03/23 18:08, , 35F
03/23 18:08, 35F
→
03/23 18:08, , 36F
03/23 18:08, 36F
→
03/23 18:08, , 37F
03/23 18:08, 37F
→
03/23 18:08, , 38F
03/23 18:08, 38F
→
03/23 18:23, , 39F
03/23 18:23, 39F
→
03/23 18:23, , 40F
03/23 18:23, 40F
→
03/23 18:23, , 41F
03/23 18:23, 41F
→
03/23 18:23, , 42F
03/23 18:23, 42F
→
03/23 18:23, , 43F
03/23 18:23, 43F
→
03/23 18:23, , 44F
03/23 18:23, 44F
→
03/23 18:23, , 45F
03/23 18:23, 45F
→
03/23 18:23, , 46F
03/23 18:23, 46F
→
03/23 18:24, , 47F
03/23 18:24, 47F
→
03/23 18:24, , 48F
03/23 18:24, 48F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
AndroidDev 近期熱門文章
PTT數位生活區 即時熱門文章