title: How to simplify switch-case for Android images?
body: <p>Assuming that I have a long <code>switch(case)</code> block in Android where I define my images inside a loop:</p>
  
  <pre><code>    for(i=0;i&lt;49;i++){
      switch(i)
      {
  
      case 0:
      imageFile.setBackgroundResource(R.drawable.img0);
      break;
  
      case 1:
      imageFile.setBackgroundResource(R.drawable.img1);
      break;
  
      (...)
  
      }}
  </code></pre>
  
  <p>Is there any other workaround to simplify it?</p>