title: How can I access ImageView that was dynamically created in LinearLayout to use it source else where?
body: <p>How can I get the source id (id.drawable.blablabla) of an ImageView that I created dynamically (like this):</p>
  
  <pre><code>ImageView image = new ImageView(this);
          image.setImageResource(imageId);
          image.setLayoutParams(new LinearLayout.LayoutParams(size, size));
          layout.addView(image);
  </code></pre>
  
  <p>I wanna use getChildAt method on my layout if it is possible. I just need that image else where and I don't have control what image it actually is becouse they creation is based on rand. Index of that element is enough for me</p>
  
  <p><strong>ANSWER</strong>
  I jsut find cool solution! I just add <code>image.setTag(imageId)</code> line of code to my method and then when I need rolled image I can simply use id under tag, thanks for help :)</p>