how to get buttonId was pressed in android
<p>I have a problem with the following piece of code:</p>

<pre><code>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;
                 }
            }

        };
</code></pre>

<p>how to get buttonId was pressed;
help me please</p>
