dynamically getting all image resource id in an array
<p>there are many images in drawable foder so instead manually creating array of all image resource ids , i want to get all images dynamically of drawable folder  in array.
currently i m using this code:</p>

<pre><code>for(int i=1;i&lt;=9;i++)
    {
            int imageKey = getResources().getIdentifier("img"+i, "drawable", getPackageName());
            ImageView image = new ImageView(this);  
            image.setId(imgId);
            image.setImageResource(imageKey);    
            image.setScaleType(ImageView.ScaleType.FIT_XY);
            viewFlipper.addView(image, new LayoutParams(LayoutParams.FILL_PARENT,              LayoutParams.FILL_PARENT));
            imgId++;
        }
</code></pre>

<p>but in that code i need to manually edit the image name to get the resource id but i want to get all image with any name..</p>
