我对以下代码有疑问:
OnClickListener button_listener = new View.OnClickListener()
{
@Override
public void onClick(View v) {
ImageButton ibutton = (ImageButton) v;
if(player == 0)
{
ibutton.setClickable(false);
ibutton.setImageResource(R.drawable.crossnew);
//Toast.makeText(getApplicationContext(),v.getText(), Toast.LENGTH_SHORT).show();
player = 1;
}
else if(player == 1)
{
ibutton.setClickable(false);
ibutton.setImageResource(R.drawable.zeronew);
player = 0;
}
}
};
如何获取 buttonId 被按下;请帮帮我