title: How to have the same size for all item of a gridView?
body: <p>I have a <code>gridview</code>, for each item i have an <code>imageview</code> with 3 <code>textView</code>s, my problem that i am using <code>wrap_ content</code> for the size of item so I haven't the same size for all items. My <code>gridview</code> code is given below: </p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@drawable/back_ground"&gt;
      &lt;GridView
  
              android:id="@+id/gridView2"
              android:layout_width="match_parent"
              android:layout_height="0dip"
              android:layout_weight="2.0"
              android:alwaysDrawnWithCache="true"
              android:columnWidth="@dimen/grid_column"
  
              style="@style/grid_space"
              android:drawSelectorOnTop="false"
              android:numColumns="auto_fit"
              android:persistentDrawingCache="animation|scrolling"
              android:scrollbars="none"
              android:stackFromBottom="false"
              android:stretchMode="columnWidth"
              android:verticalSpacing="48dp"&gt;
      &lt;/GridView&gt;
  &lt;/LinearLayout
  </code></pre>
  
  <p>the code of my item :</p>
  
  <pre><code>&lt;RelativeLayout
          android:id="@+id/relativeLayout1"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:background="@drawable/round_boutton"
          android:orientation="vertical"
          android:padding="5dp"&gt;
      &lt;ImageView
              android:layout_height="96dp"
              android:id="@+id/imageView1"
              android:layout_width="96dp"
              android:src="@drawable/icon"
              android:layout_marginTop="15dp"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="15dp"
              android:layout_alignParentTop="true"
              android:layout_centerHorizontal="true"&gt;
      &lt;/ImageView&gt;
      &lt;TextView
              android:text="TextView"
  
              android:id="@+id/textView1"
  
              android:layout_below="@+id/imageView1"
              android:layout_marginTop="4dp"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="15dp"
               android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:singleLine="true"
              android:textColor="@color/orangemil"
              android:paddingTop="4dp"
              android:textSize="14dip"
  
  
              android:gravity="center_horizontal|center_vertical"&gt;&lt;/TextView&gt;
  
      &lt;TextView android:text="  "
                android:id="@+id/textView2"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp"
                android:layout_below="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/white"&gt;&lt;/TextView&gt;
  
      &lt;TextView android:text="   "
                android:id="@+id/textView3"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp"
                android:layout_below="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_marginBottom="15dp"
                android:layout_height="wrap_content"
                android:textColor="@color/white"&gt;&lt;/TextView&gt;
      &lt;View
              android:layout_width="fill_parent"
              android:layout_height="1dp"
              android:layout_below="@+id/textView3"
              android:background="@android:color/transparent"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I tried to use a fixed size:</p>
  
  <pre><code>gridView.setLayoutParams(new GridView.LayoutParams(150,150)); //dimension in px
  </code></pre>