ImageButton.setonClickListener(listener);
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View v){
ImageButton imageButton = (ImageButton) v;
switch (imageButton.getId()) {
case R.id.imageButton_phone :
break;
case R.id.imageButton2 :
break;
}
}
}
网友评论