标签:
时间:2016年4月20日14:21:49
static class MyHandler extends Handler {
private WeakReference<Context> weakReference;
public MyHandler(Context context) {
weakReference = new WeakReference<>(context);
}
@Override
public void handleMessage(Message msg) {
XXActivity activity = (XXActivity) weakReference.get();
if (activity != null) {
activity.textView.setText(result);
}
}
}
标签:
原文地址:http://www.cnblogs.com/yuzhongzheng/p/5412590.html