setImageresource in android - how to use it for many pictures in a loop
<p>it is a rather simple question. I have 5 imageViews and 5 images in drawable folder. ImageViews are named <code>imageView1</code>...<code>imageView5</code> and images are named <code>image1</code>...<code>image5</code></p>

<p>I want how can I write the following elegantly:</p>

<pre><code>  imageView1.setImageResource(R.drawable.image1)
  imageView2.setImageResource(R.drawable.image2)
  imageView3.setImageResource(R.drawable.image3)
  imageView4.setImageResource(R.drawable.image4)
  imageView5.setImageresource(R.drawable.image5)
</code></pre>

<p>As you understand, there are not just 5 imageViews, but there are many more and I want to write it in a loop. I am having problems because <code>R.drawable.imageX</code> is integer not string.</p>
