Handler、Message、MessageQueue随笔

Handler、Message

1、基本用法:

创建Handler重写handlerMessage(Message msg)处理消息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Handler handler = new Handler(){
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
// TODO 处理消息
}
};
Handler handler = new Handler(new Handler.Callback(){
@Override
public boolean handleMessage(Message msg) {
// TODO 处理消息
return false;
}
});
阅读全文 »

Android hot-fix热修复

AndFix

项目地址:https://github.com/alibaba/AndFix

AndFix is a solution to fix the bugs online instead of redistributing Android App.
AndFix is an acronym for “Android hot-fix”.
AndFix supports Android version from 2.3 to 6.0, both ARM and X86 architecture, both Dalvik and ART runtime.

阅读全文 »