How to create a working array with images in Android?
<p>I have been struggling to work with images using an array for my android application , i had created an array with a few images but even after i use a loop only 1 image gets loaded on the imageview i.e the last image present in the array so here only 'fourofclubs.png' is getting loaded. Basically i want to load images as a sequence using a loop on a single ImageView 'image1'.</p>

<p>this is my code:-</p>

<pre><code>                  ImageView image1=(ImageView)findViewById(R.id.imageView1);
                         int[] cardsdeck = 
                {
                    R.drawable.aceofclubs,
                    R.drawable.deuceofclubs,
                    R.drawable.threeofclubs,
                    R.drawable.fourofclubs,
                            };


            for ( int i = 0; i &lt; cardsdeck.length; i++ )
            { 
                image1.setImageResource(cardsdeck[i]);

            }
</code></pre>
