title: problem with 3 button layout in android
body: <p>I have an activity with three buttons in the layout. All the buttons are at the bottom. I wanted the button to be extreme left,centre and extreme right. The extreme right and the extreme left buttons are fine. However, the centre button is taking up all the space in between the left and right button. However, I want the middle button to take necessary space and not all the space. Also, I am unable to move the imageButton to the middle of the screen. Any help with these things? Here's my XML layout file:</p>
  
  <pre><code>            &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
              &lt;RelativeLayout
              android:id="@+id/rel"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:background="@drawable/backgroundnr"
              xmlns:android="http://schemas.android.com/apk/res/android"
              &gt;
  
              &lt;ImageButton
              android:id="@+id/imageButtons"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/tempText2"
              android:layout_above="@+id/tempText"
              android:gravity="center"
              android:src="@drawable/start"
              android:background="@null"
              android:layout_gravity="center_horizontal"
              &gt;
              &lt;/ImageButton&gt;
  
              &lt;TextView
              android:id="@+id/tempText"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Touch to Start"
              android:layout_centerVertical="true"
              android:layout_gravity="center_vertical"
              &gt;
              &lt;/TextView&gt;
  
              &lt;ImageView
              android:id="@+id/bottomlayout"
              android:layout_width="fill_parent"
              android:layout_height="100px"
              android:src="@drawable/bottombar"
              android:layout_alignParentBottom="true"
              &gt;
              &lt;/ImageView&gt;
  
              &lt;Button
              android:id="@+id/profileButtons"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Profile"
              android:drawableTop="@drawable/profiledefault"
              android:gravity = "bottom"
              android:background="#0000"
              android:layout_alignParentBottom="true"
              android:layout_alignLeft="@+id/bottomlayout"
              android:textColor="#FFFFFF"
              android:paddingLeft="10dip"
              android:paddingBottom="5dip"
              &gt;
              &lt;/Button&gt;
              &lt;Button
              android:id="@+id/savedButtons"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Saved"
              android:drawableTop="@drawable/favoritesdefault"
              android:gravity = "bottom"
              android:background="#0000"
              android:layout_alignParentBottom="true"
              android:textColor="#FFFFFF"
              android:paddingBottom="5dip"
              android:layout_toRightOf="@+id/profileButtons"
              android:layout_toLeftOf="@+id/recentButtons"
              android:layout_gravity="center_horizontal"
              &gt;
              &lt;/Button&gt;
              &lt;Button
              android:id="@+id/recentButtons"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Recent"
              android:drawableTop="@drawable/recentdefault"
              android:gravity = "bottom"
              android:background="#0000"
              android:layout_alignParentBottom="true"
              android:textColor="#FFFFFF"
              android:layout_alignParentRight="true"
              android:paddingRight="10dip"
              android:paddingBottom="5dip"
              &gt;
              &lt;/Button&gt;
              &lt;/RelativeLayout&gt;
  </code></pre>