How i can get image id from ImageView?
<p>Have code like this:</p>

<pre><code>case R.id.button:
int id=randImage();
imgView1.setImageResource(id);
public int randImage() {
Random rand= new Random();
int randomNumber=rand.nextInt(24)+1;
String randomImage="img"+randomNumber;
int id = getResources().getIdentifier(randomImage, "drawable", getPackageName());
return id;

}
case R.id.imgView1:
Intent i= new Intent(); 
i.putExtra("imgId", id); //IS UNREACHABLE
</code></pre>

<p>How i can get drawable id after set ?</p>
