TextView里的setText方法 .

第一步:在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++;

}

扫描二维码关注公众号,回复: 3930118 查看本文章

http://blog.csdn.net/vincent_czz/article/details/5653878

猜你喜欢

转载自blog.csdn.net/ljxqsqmoliwei/article/details/51751061