title: Store Image id in a array on Android
body: <p>I want to store selected Image Id in a array from drawable </p>
  
  <p>Suppose i have a image a like this</p>
  
  <pre><code>private Integer[] mThumbIds = {
      R.drawable.sample_2, R.drawable.sample_3,
      R.drawable.sample_4, R.drawable.sample_5,
      R.drawable.sample_6, R.drawable.sample_7,
      R.drawable.sample_0, R.drawable.sample_1,
      R.drawable.sample_2, R.drawable.sample_3,
      R.drawable.sample_4, R.drawable.sample_5,
      R.drawable.sample_6, R.drawable.sample_7,
      R.drawable.sample_0, R.drawable.sample_1,
      R.drawable.sample_2, R.drawable.sample_3,
      R.drawable.sample_4, R.drawable.sample_5,
      R.drawable.sample_6, R.drawable.sample_7
  </code></pre>
  
  <p>};</p>
  
  <p>Now i want to create same array with the help of loop please suggest me how i can do it</p>
  
  <p>Thanks In Advance</p>