title: android layout auto resize buttons to fill height
body: <p>I have 6 buttons inside a LinearLayout. The layout is centered.</p>
  
  <p>Is it possible for the buttons to automatically resize in height so that each button is the same height but the total of all buttons combined (plus say a 10dp gap between them) equals the height of the layout.</p>
  
  <p>I need to do this so if the app is used on a device with a bigger screen or a higher resolution it will scale the buttons to fill the layout.</p>
  
  <p>Any help and guidance is appreciated.</p>
  
  <p>Mark</p>
  
  <p>EDIT CODE</p>
  
  <pre><code>&lt;ScrollView
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="center_horizontal"
          android:orientation="vertical"
          android:background="#ffffff"
          android:layout_marginLeft="15dp"
          android:layout_marginRight="15dp"&gt;
  
          &lt;Button
              android:id="@+id/button4"
              android:layout_width="420px"
              android:layout_height="99px"
              android:layout_marginLeft="20sp"
              android:layout_marginRight="20sp"
              android:background="@drawable/butt1"
              android:onClick="clk_raynes"
              android:text="sitebutton"
              android:layout_marginTop="10dp"
              android:textColor="#000000"
              android:textSize="50px" /&gt;
  
  
          &lt;Button
              android:id="@+id/rutlishbtn"
              android:layout_width="420px"
              android:layout_height="99px"
              android:layout_marginLeft="20sp"
              android:layout_marginRight="20sp"
              android:layout_marginTop="6dp"
              android:background="@drawable/butt1"
              android:onClick="clk_rutlish"
              android:text="Site2"
              android:textColor="#000000"
              android:textSize="50px" /&gt;
  
  
          &lt;Button
              android:id="@+id/harrisbtn"
              android:layout_width="420px"
              android:layout_height="99px"
              android:layout_marginLeft="20sp"
              android:layout_marginRight="20sp"
              android:layout_marginTop="6dp"
              android:background="@drawable/butt1"
              android:onClick="clk_harris"
              android:text="Site3"
              android:textColor="#000000"
              android:textSize="50px" /&gt;
  
          &lt;Button
              android:id="@+id/button3"
              android:layout_width="420px"
              android:layout_height="99px"
              android:layout_marginLeft="20sp"
              android:layout_marginRight="20sp"
              android:layout_marginTop="6dp"
              android:background="@drawable/butt1"
              android:onClick="clk_ricards"
              android:text="Site4"
              android:textColor="#000000"
              android:textSize="50px" /&gt;
          &lt;Button
              android:id="@+id/button10"
              android:layout_width="420px"
              android:layout_height="99px"
              android:layout_marginLeft="20sp"
              android:layout_marginRight="20sp"
              android:layout_marginTop="6dp"
              android:background="@drawable/butt1"
              android:onClick="clk_btn10"
              android:text="Site5"
              android:textColor="#000000"
              android:textSize="50px" /&gt;
  
          &lt;Button
              android:id="@+id/button11"
              android:layout_width="420px"
              android:layout_height="99px"
              android:layout_marginLeft="20sp"
              android:layout_marginRight="20sp"
              android:layout_marginTop="6dp"
              android:background="@drawable/butt1"
              android:onClick="clk_btn11"
              android:text="Site6"
              android:textColor="#000000"
              android:textSize="50px" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical" &gt;
          &lt;/LinearLayout&gt;
  
          &lt;Button
              android:id="@+id/picbtn3"
  
              android:layout_marginTop="6dp"
              android:layout_marginBottom="190px"
  
              android:text="³"
              android:textColor="#000000"
              android:textSize="30sp"
              android:layout_width="60dp"
              android:layout_height="60dp"
              android:background="@drawable/butt1"
              android:onClick="qrbtn" /&gt;
  
          &lt;/LinearLayout&gt;
         &lt;/ScrollView&gt;
  </code></pre>