Android MessageQueue Mechanism
来源:互联网 发布:淘宝修改中差评 编辑:程序博客网 时间:2024/05/01 17:03
Android MessageQueue Mechanism
Core classes:
Handler – the operator, user apps use this to operate the Messages: send messagewith postRunnable, sendMessage etc. and process Messages in handleMessage.
Message – the container for the data andinformation
MessageQueue – the internal containers forMessages. User apps are not allowed to operate it directly. It is operatedinternally by Handler
Looper – the rules which let thread rununtil stop() is called. This is much like use a while (true) in the thread tomake it run as long as you wish
The general Message processing would be like this:
1. make the thread (either main thread or user-created thread) can loop,with calling Looper.prepare();
2. Send the Message with Handler.
3. OverrideHandler.handleMessage to process the Message;
4. Stop the looper by callingLooper.stop(), then thread will exit.
- Android MessageQueue Mechanism
- Android message handling mechanism (Handler, Looper, MessageQueue and Message)
- Android message handling mechanism (Handler, Looper, MessageQueue and Message)
- Android Binder Mechanism (1)
- Android Binder Mechanism (1)
- Android Binder Mechanism
- Android parcel mechanism
- (Android) Handler Mechanism
- Android Resources Overlay Mechanism
- Android Resources Overlay Mechanism
- Android default phone mechanism
- Android Media Scanner Mechanism Analyze
- Android Media Scanner Mechanism Analyze
- Android Media Scanner Mechanism Analyze
- android源码解析--MessageQueue
- Android Handler Looper MessageQueue
- Android Handler+Looper+MessageQueue
- Android MessageQueue 源码笔记
- Android简介
- Builder
- MVC2 中的Action link产生的方式
- 腾讯下个月推行QQ实名制 部分用户称大不了不用
- A configuration error occurred during startup. Please......
- Android MessageQueue Mechanism
- A类中含有B类的一种方法
- Symbian 开机启动
- Quartz 2D编程指南1-------Quartz 2D概述
- 彻底认清PHP单例模式
- 解决:SQL1005N 在本地数据库目录或系统数据库目录中已经存在数据库别名
- 网络不通,误删路由信息 (hp unix机器)
- POJ 3093 Margaritas on the River Walk
- MyEclipse卡死的解决方案