title: Button width does not match parent android
body: <p>I have the following xml:</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="wrap_content"
  android:layout_height="wrap_content"
  android:orientation="vertical" &gt;
      &lt;TextView
      android:id="@+id/text_view"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:layout_gravity="center_horizontal|center_vertical"
      android:layout_marginTop="20dip"
      android:text="Fragment1"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:textSize="30dip" /&gt;
  
      &lt;Button 
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Button1"/&gt;
  
  
   &lt;GridView 
        android:id="@+id/gridview"
        android:layout_width="wrap_content" 
        android:layout_height="match_parent"overla
        android:columnWidth="90dp"
        android:numColumns="auto_fit"
        android:verticalSpacing="10dp"
        android:horizontalSpacing="10dp"
        android:stretchMode="columnWidth"
        android:gravity="center"/&gt;                            
  
          &lt;Button 
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Button1"/&gt;
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The button1 is used to toggle the visibility of the grid view. But, when the grid view is not visible, the buttons don't fill the screen. They occupy half the screen. When the grid view is visible though, the buttons occupy all of the screen as I want them to. I haven't been able to understand this strange behaviour.</p>