这个代码编译器不报错,但是运行时出现停止运行的显示怎么回事
public class MainActivity extends Activity implements OnClickListener,Runnable{
private Button bt;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bt=(Button) findViewById(R.id.button1);
bt.setOnClickListener(this);
}
@Override
public void run() {
bt.setText("改变");
}
@Override
public void onClick(View v) {
Thread t=new Thread(new MainActivity());
t.start();
Toast.makeText(getApplication(), "监听到点击事件", 1).show();
}
}