liyh 发表于 2013-2-7 20:20:17

android "Only the original thread that created a view hierarchy can tou

android在新的线程中操作view时出现的异常如题, 可以用如下操作解决。
final Handler mHandler = new Handler() {public void handleMessage(Message msg) {super.handleMessage(msg);//update your view function}};         new Thread( new Runnable() {            public void run() {            //download data function            mHandler.sendMessage(mHandler.obtainMessage());             } }).start();

参考:
http://hi.baidu.com/googledev/blog/item/b076a850e11d706684352456.html
页: [1]
查看完整版本: android "Only the original thread that created a view hierarchy can tou