Creating integer array of resource ids
<p>I have some images in my res/drawable folder. Let's say img1.png,
img2.png and img3.png</p>

<p>I am currently creating an int array of these image IDs in Java like
this</p>

<pre><code>int[] imgIds = {R.drawable.img1, R.drawable.img2, R.drawable.img3};
</code></pre>

<p>Instead is it possible to create an int arr in one of res/values files
(say strings.xml) like this</p>

<pre><code>   &lt;integer-array name="img_id_arr"&gt;
       &lt;item&gt;@drawable/img1&lt;/item&gt;
       &lt;item&gt;@drawable/img2&lt;/item&gt;
       &lt;item&gt;@drawable/img3&lt;/item&gt;
   &lt;/integer-array&gt;
</code></pre>

<p>and then access it in Java via  </p>

<pre><code>getResources().getIntArray(R.array.ing_id_arr)
</code></pre>
