Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
什么是 Android 中的Handler类?
处理程序基本上是一个消息队列。你向它发布一条消息,它最终会通过调用它的 run 方法并将消息传递给它来处理它。由于这些运行调用将始终按照在同一线程上接收到的消息的顺序发生,因此它允许您序列化事件。
正如 android 开发网站上的Handler文档中所给出的,Handler 有两个主要用途: