title: dynamically loading images from res in android
body: <p>I am creating a comic reader app that displays images and one a transparent button click moves to the next image I don't want to get into storage and or loading from the internet right now so I am keeping it simple and stupid(I know) and storing all the images in res/drawable there are over 1000 images and so loading them by name and typing them all out seems ridiculous they are labled t1 t2 t3 t... I am using </p>
  
  <pre><code>ImageView image = (ImageView) findViewById(R.id.MainComic);
  image.setImageResource(R.drawable.t1);
  </code></pre>
  
  <p>in a switch that is uses and integer that is added to on the button click but that would require typing out 1000+ cases for the integers is there a way to have </p>
  
  <pre><code>image.setImageResource(R.drawable.t(int));
  </code></pre>
  
  <p>I know it is not that simple as that is what I tried first thanks in advance.</p>