Android 为Button对象添加OnClickListener监听器 public void onCreate(Bundle savedInstanceState) {//重写onCreate方法 super.onCreate(savedInstanceState); setContentView(R.layout.main); //设置屏幕 Button btn = (Button)findViewById(R.id.btn); //获取Button对象 btn.setOnClickListener(new OnClickLi