title: getImageResource() Android. Is this possible?
body: <p>I have set an image for an <code>ImageView</code> using the <code>setImageResource(R.drawable.icon1)</code>. </p>
  
  <p>Now my requirement is to find out what is the image that is set for an <code>ImageView</code> and do some processing.</p>
  
  <p>Like</p>
  
  <pre><code>if (imageView.getImageResource() == R.drawable.icon1) {
    //do some processing
  else if (imageView.getImageResource() == R.drawable.icon2) {
    //do somethign else
  else 
   //display
  </code></pre>
  
  <p>So I would like to know if there exists a method(AFAIK, it doesn't) and if it doesn't how to keep a track of what resources have been set for an <code>ImageView</code>.</p>
  
  <p>Thanks.
  Sana.</p>