在工作线程中处理UI线程报错:Only the original thread that created a view hierarchy can touch its views.
如果将更新UI控件的代码写入到工作线程中便会报错,
例子如下:
Runnable socketRun = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
tv = (TextView) findViewById(R.id.tv);
Soc
原创
2013-09-04 10:19:16 ·
23987 阅读 ·
5 评论