标签:
Button ib_01;
Textview tv_01;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ib_01 = (Button)this.findViewById(R.id.这里写你按钮的ID);
tv_01 = (Textview)this.findViewById(R.id.这里写你textview的ID);
ib_01.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
tv_01.settext("这里写你想显示在textview上的字符串");
}
})
标签:
原文地址:http://www.cnblogs.com/guolili/p/4547135.html