只要在监听的时间中加入我们想要的事件就可以了。当然两个不能冲突。
譬如:
photo_btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Toast.makeText(this,"你好",Toast.LENGTH_LONG).show();
startActivity(new Intent(hello.this, hello2.class));});
只要在监听的时间中加入我们想要的事件就可以了。当然两个不能冲突。
譬如:
photo_btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Toast.makeText(this,"你好",Toast.LENGTH_LONG).show();
startActivity(new Intent(hello.this, hello2.class));});