上面的例子会报“Only the original thread that created a view hierarchy can touch its views. ”
正确的写法应该是在子线程中组装数据,然后通过handler发送消息给UI线程,最后在UI线程中更新UI: