title: Android Layout alignment issues
body: <p>I have a layout which i need to make it look alike Image B. But it comes like Image A. Am i messing too much with Linear or Relative Layouts ? Also i have footbar buttons inside Table Layout which works fine in all other screens but for this it doesn't shows up. Below is my code :</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:background="#ffffff"
      android:orientation="vertical"
      android:padding="8dip" &gt;
  
      &lt;RelativeLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="#f2f2f2"
          android:gravity="center"
          android:orientation="vertical" &gt;
  
          &lt;ImageView
              android:id="@+id/back"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_centerInParent="true"
              android:layout_marginLeft="0dip"
              android:src="@drawable/back" /&gt;
  
          &lt;TextView
              android:id="@+id/inboxtext"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:gravity="center_horizontal|center_vertical"
              android:background="#f2f2f2"
              android:textColor="#444444"
              android:text="New message"
              android:textSize="18sp" &gt;
          &lt;/TextView&gt;
  
          &lt;ImageView
              android:id="@+id/deleteheader"
              android:layout_width="2dip"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_marginLeft="3dp"
              android:layout_toLeftOf="@+id/delete"
              android:background="#ffffff"
              android:paddingBottom="15dip"
              android:paddingTop="15dip" /&gt;
  
          &lt;ImageButton
              android:id="@+id/emailsender"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:background="@drawable/sendicon"
              android:text="Sync" /&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="#f2f2f2"
          android:gravity="center"
          android:orientation="vertical" &gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="#444444"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/dropdown_textview"
              android:layout_width="fill_parent"
              android:layout_height="43dp"
              android:layout_gravity="top"
              android:background="@drawable/dropdown_background"
              android:gravity="center_vertical|left"
              android:hint="Select Subject"
              android:paddingLeft="15dp"
              android:textColor="#4a82ae"
              android:textSize="15sp" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="300dp"
              android:layout_gravity="top"
              android:layout_marginTop="44dp"
              android:orientation="vertical" &gt;
  
              &lt;EditText
                  android:id="@+id/mailcontent"
                  android:layout_width="match_parent"
                  android:layout_height="fill_parent"
                  android:background="@color/white"
                  android:gravity="left"
                  android:hint="Enter Content Here"
                  android:paddingLeft="15dp"
                  android:textColorLink="@color/white" &gt;
  
                  &lt;requestFocus /&gt;
              &lt;/EditText&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/dropdown_foldout_menu"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_below="@+id/dropdown_textview"
              android:layout_gravity="top"
              android:layout_marginTop="42dp"
              android:background="@drawable/dropdown_background"
              android:orientation="vertical"
              android:padding="1dip"
              android:visibility="gone" &gt;
  
              &lt;TextView
                  android:id="@+id/dropdown_alt0"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/dropdown_selector"
                  android:gravity="center_vertical|left"
                  android:padding="10dip"
                  android:text="Subject 1"
                  android:textSize="17dp" /&gt;
  
              &lt;View
                  android:layout_width="fill_parent"
                  android:layout_height="1dip"
                  android:background="#cccccc" /&gt;
  
              &lt;TextView
                  android:id="@+id/dropdown_alt1"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/dropdown_selector"
                  android:gravity="center_vertical|left"
                  android:padding="10dip"
                  android:text="Subject 2"
                  android:textSize="17dp" /&gt;
  
              &lt;View
                  android:layout_width="fill_parent"
                  android:layout_height="1dip"
                  android:background="#cccccc" /&gt;
  
              &lt;TextView
                  android:id="@+id/dropdown_alt2"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/dropdown_selector"
                  android:gravity="center_vertical|left"
                  android:padding="10dip"
                  android:text="Subject 3"
                  android:textSize="17dp" /&gt;
  
              &lt;View
                  android:layout_width="fill_parent"
                  android:layout_height="1dip"
                  android:background="#cccccc" /&gt;
  
              &lt;TextView
                  android:id="@+id/dropdown_alt3"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/dropdown_selector"
                  android:gravity="center_vertical|left"
                  android:padding="10dip"
                  android:text="Subject 4"
                  android:textSize="17dp" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/FrameLayout&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;TableLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_centerInParent="true"
          android:gravity="bottom"
          android:stretchColumns="*" &gt;
  
          &lt;TableRow
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:gravity="center_horizontal" &gt;
  
              &lt;Button
                  android:id="@+id/home"
                  android:layout_width="0dp"
                  android:layout_weight="1"
                  android:background="#092435"
                  android:gravity="center"
                  android:padding="15dip"
                  android:text="Activity"
                  android:textColor="#ffffff" /&gt;
  
              &lt;Button
                  android:id="@+id/status"
                  android:layout_width="0dp"
                  android:layout_weight="1"
                  android:background="#092435"
                  android:gravity="center"
                  android:padding="15dip"
                  android:text="Support"
                  android:textColor="#ffffff" /&gt;
  
              &lt;Button
                  android:id="@+id/support"
                  android:layout_width="0dp"
                  android:layout_weight="1"
                  android:background="#092435"
                  android:gravity="center"
                  android:padding="15dip"
                  android:text="Messages"
                  android:textColor="#ffffff" /&gt;
          &lt;/TableRow&gt;
      &lt;/TableLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>