title: ImageButton - how to read the image ID?
body: <p>Sorry for the banal question, but I'm new to Android. I have such a problem. I have several ImageButton elements and I need to change their images depending on what is on them during onClick() event. While setting a new image is not a problem, I can not programmatically read what image is currently (the next image depends on it).I search various sources and can't find a solution. It is certainly very simple.</p>
  <p>I want to have a code like this:</p>
  <pre><code>if (ImageButton1.image... == R.drawable.img1)
  {
     ImageButton1.setImageResource(R.drawable.img2)
     ImageButton2.setImageResource(R.drawable.img3)
     ...
  }
  </code></pre>
  <p>Any help appreciated. Thanks...</p>