vaechr
我欠你的不是一句对不起
2016-09-02 10:58

HandlerThread怎么更新ui

2
  • android

HandlerThread怎么更新ui,我试了很多方法,都不能更新ui,求大神们指导一下

 HandlerThread handlerThread = new HandlerThread(getMainLooper().toString());
        handlerThread.start();
        MyHandler myHandler = new MyHandler(handlerThread.getLooper());
        Message message = myHandler.obtainMessage();
        message.sendToTarget();

                public class MyHandler extends Handler {
    public MyHandler(Looper looper){
        super(looper);
    }
    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
    }
} 

在handleMessage(Message msg)方法里怎么不能更新ui

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

7条回答