摘要:
一、Handler是什么? 在Android开发中,使用消息队列(message)完成线程间通信。而使用消息队列的线程就是消息循环(message looper)。消息循环不断的检查消息队列,是否有新消息。消息循环是由一个线程和一个looper组成;looper对象管理着线程的消息队列。 Andro 阅读全文
摘要:
在Handler基础篇中讲述了Handler原理和使用,下面是从Handler源码进一步解析Handler。 一、源码解析 1. Handler的构造函数 1 /** 2 * Use the {@link Looper} for the current thread with the specifi 阅读全文