title: Android Layout: 3 buttons at the bottom
body: <p>I am designing a layout which has 3 buttons at the bottom very adjacent to each other. Because I want to add some more button in the middle of the screen too so what I am doing is I set up a whole screen as a Relative Layout and to get the 3 buttons at the bottom I add a Linear Layout to contain those 3 buttons. However, it gets stuck. The button does not show 3 buttons in the bottom. Here is my xml layout file</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
  
  
      &lt;LinearLayout
          android:id="@+id/linearLayout1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentLeft="true"
          android:orientation="vertical" 
          android:weightSum="1"&gt;
  
             &lt;Button
          android:id="@+id/button1"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:text="Button1"
          android:layout_weight="0.3" /&gt;
            &lt;Button
          android:id="@+id/button2"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:text="Button2" 
           android:layout_weight="0.3"/&gt;
                                &lt;Button
          android:id="@+id/button3"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:text="Button3"
           android:layout_weight="0.3" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;Button
          android:id="@+id/button4"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_alignTop="@+id/linearLayout1"
          android:layout_marginTop="16dp"
          android:layout_toRightOf="@+id/linearLayout1"
          android:text="Button" /&gt;
  
      &lt;Button
          android:id="@+id/button5"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/button4"
          android:layout_alignParentRight="true"
          android:layout_below="@+id/button4"
          android:layout_marginTop="20dp"
          android:text="Button" /&gt;
  
      &lt;Button
          android:id="@+id/button6"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentRight="true"
          android:layout_below="@+id/button5"
          android:layout_marginTop="24dp"
          android:text="Button" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>