既然:Android禁止其他子线程来更新由UI thread创建的试图
那为什么,这段代码可以更新TextView里的内容?
package com.wo;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;import android.widget.TextView;public class Ss3Activity extends Activity { Thread otherthread = null; private TextView tv; private Button button; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv = (TextView) this.findViewById(R.id.tv); otherthread = new Thread("other thread") { @Override public void run() { tv.setText("come baby"); } }; otherthread.start(); }}