Dialog中使用handler时报:Can't create handler inside thread that has not called Looper.prepare()
dialog的show方法前后加,Looper.prepare();和Looper.loop();即可
但这样会扰乱 Looper的运行机制,在主线程中就不行在使用handler了
建议用其他方式代替Dialog中的handler。
Dialog中使用handler时报:Can't create handler inside thread that has not called Looper.prepare()
dialog的show方法前后加,Looper.prepare();和Looper.loop();即可
但这样会扰乱 Looper的运行机制,在主线程中就不行在使用handler了
建议用其他方式代替Dialog中的handler。