Dynamically loading images
<p>I am stuck in an peculiar scenario, while developin an app in android.</p>

<p>My app, downloads image from internet and populates the same in a thumbnail format in the application.</p>

<p>As i am not aware of the number of picture's/thumbnails at design time, i am creating image view controls dynamically by using the below mentioned code.</p>

<pre><code>ArrayList&lt;String&gt; parsedPhoto=oPhotoList.getPhoto();
RelativeLayout media = (RelativeLayout)findViewById(R.id.media);
RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(
    RelativeLayout.LayoutParams.MATCH_PARENT,
    RelativeLayout.LayoutParams.WRAP_CONTENT);

for(int iCounter=0;iCounter&lt;parsedPhoto.size();iCounter++)
{
    bitmap=oParser.DownloadImage(parsedPhoto.get(iCounter));
    ImageView img = new ImageView(this);
    img.setImageBitmap(bitmap); 
    media.addView(img,p);
}
</code></pre>

<p>But in this scenario, all my images gets overlapped with each other.
Wherein i want 3 images to be displayed on each row, which i am able to achieve through xml.</p>

<p>Can somebody help me out.</p>
