title: GridView height of row
body: <p><br>
  How to make row height fit the tallest item in GridView?
  Because by default it's fail.
  <img src="https://i.stack.imgur.com/smW2L.png" alt="enter image description here"></p>
  
  <p>update:
  here is layout with grid</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;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" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>this is layout of grid item</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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" /&gt;
  </code></pre>
  
  <p>this is background drawable of grid item</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;gradient
          android:angle="270"
          android:endColor="#F2DBA7"
          android:startColor="#F2DBA7" /&gt;
  
      &lt;corners android:radius="7dip" /&gt;
  
      &lt;stroke android:width="3dip" android:color="#C90E0E"/&gt;
  
      &lt;padding
          android:bottom="5dip"
          android:left="5dip"
          android:right="5dip"
          android:top="5dip" /&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>this is source code of activity </p>
  
  <pre><code>    import android.app.Activity;
      import android.os.Bundle;
      import android.widget.ArrayAdapter;
      import android.widget.GridView;
  
      public class GridActivity extends Activity {
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.main);
              GridView grid = (GridView) findViewById(R.id.gird);
  
              ArrayAdapter&lt;String&gt; answeredWords = new ArrayAdapter&lt;String&gt;(this,
                      R.layout.grid_item);
              grid.setAdapter(answeredWords);
              answeredWords.add("123456789101234567891012345678910");
              answeredWords.add("12345678910");
              answeredWords.add("12345678910123456789101234567891012345678910");
              answeredWords.add("12345678910");
              answeredWords.add("12345678910123456789101234567891012345678910");
              answeredWords.add("1234567891012345678910");
              answeredWords.add("1234567891012345678910");
              answeredWords.add("1234567891012345678910");
              answeredWords.add("1234567891012345678910");
              answeredWords.add("1234567891012345678910");
              answeredWords.add("123456789101234567891012345678910");
              answeredWords.add("123456789101234567891012345678910");
          }
  }
  </code></pre>
  
  <p>UPDATE:
  I rewrote the GridView, he find the maximum height of the element row and sets all the elements of this row the same height.</p>