tags:

views:

21

answers:

1

Friend's I have a task to parse thumbnail images and to set it on grid view,where url image content to be in different height and width(some images to be 60*60, or 110*80),how can i set images in grid have uniform height and width.

Thanks in advance.

+1  A: 

Give your layout for the views created by the ListAdapter a fixed width and height sufficient for the largest dimensions, then position the ImageView centered inside e.g.:

<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="100dip" 
    android:layout_height="80dip" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    <ImageView android:id="@+id/imageView" android:layout_width="fill_parent" android:layout_height="fill_parent"
android:scaleType="centerInside"
        >
    </ImageView>
</RelativeLayout>
Thorstenvv
thanks a lot.. for your answer,i really got the view i needed from your help.
MGSenthil