第一步:在activity_main.xml中添加TextView控件
第二步:使用findViewById()方法找到控件
public void Btn1_Click(View view){
TextView textView=(TextView)findViewById(R.id.textView1);
String str="-------->"+count;
textView.setText(str);
count++;
}
第一步:在activity_main.xml中添加TextView控件
第二步:使用findViewById()方法找到控件
public void Btn1_Click(View view){
TextView textView=(TextView)findViewById(R.id.textView1);
String str="-------->"+count;
textView.setText(str);
count++;
}