How to make row height fit the tallest item in GridView? Because by default it's fail. enter image description here

update: here is layout with grid

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <GridView
        android:id="@+id/gird"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:fadeScrollbars="false"
        android:horizontalSpacing="5dip"
        android:numColumns="3"
        android:verticalSpacing="5dip" />

</LinearLayout>

this is layout of grid item

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:background="@drawable/grid_item_background"
    android:textColor="#000000" />

this is background drawable of grid item

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <gradient
        android:angle="270"
        android:endColor="#F2DBA7"
        android:startColor="#F2DBA7" />

    <corners android:radius="7dip" />

    <stroke android:width="3dip" android:color="#C90E0E"/>

    <padding
        android:bottom="5dip"
        android:left="5dip"
        android:right="5dip"
        android:top="5dip" />

</shape>

this is source code of activity

    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.ArrayAdapter;
    import android.widget.GridView;

    public class GridActivity extends Act
Edit
Report