0

I have a GridView with 3 columns and 5 rows of images.

currently configureg like...

<GridView
    android:id="@+id/faces_gridview"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:numColumns="3" >
</GridView>

I want the images inside to resize themselves to fit 3x5 grid which is different in each phone. how can I tell the GridView to resize the images based on the grid size that I want ?

numColumns sets the columns but it does not reassure me that there will be 5 rows visible in the screen. I don't want to use a scroller.

4

1 回答 1

1

根据GridView 自动调整图像GridView 不拉伸到所有屏幕

尝试

android:scaleType="fitXY" in image view 

and

 android:stretchMode="columnWidth" in grid view
于 2012-06-22T05:50:27.463 回答