按钮点击事件基础代码收藏
protected voidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.signactivity);
button_sign=(Button) findViewById(R.id.button_sign); 绑定按键 id
button_sign.setOnClickListener(newView.OnClickListener(){
public voidonClick(View v) {
这里面放入点击事件响应
}
});
网友评论