Hi all,
I am stuck in an peculiar scenario, while developin an app in android.
My app, downloads image from internet and populates the same in a thumbnail format in the application.
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.
ArrayList<String> 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<parsedPhoto.size();iCounter++)
{
bitmap=oParser.DownloadImage(parsedPhoto.get(iCounter));
ImageView img = new ImageView(this);
img.setImageBitmap(bitmap);
media.addView(img,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.
Can somebody help me out.