title: Can't get RelativeLayout to set above another RelativeLayout?
body: <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical" &gt;
  
  &lt;RelativeLayout
      android:id="@+id/sendToLayout"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:orientation="vertical"
      android:background="#292929" &gt;
  &lt;Button
      android:id="@+id/button1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBottom="@+id/editText1"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:text="Contacts"
      android:layout_marginTop="10dp"
      android:layout_marginRight="5dp" /&gt;
  
  
  &lt;EditText
      android:id="@+id/sendToType"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_toLeftOf="@+id/button1"
      android:ems="10"
      android:layout_margin="10dp"
      android:hint="To" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/previewlayout"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:layout_below="@+id/sendToLayout"
      android:orientation="vertical" &gt;
  
      &lt;TextView 
          android:id="@+id/preview"
          android:text="Message Preview: "
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textStyle="bold"
          android:textColor="#ffffff"
          android:layout_marginTop="5dp"
  
          /&gt;
  
  
  
      &lt;RelativeLayout
          android:id="@+id/previewLayout"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_below="@+id/preview"
          android:layout_marginTop="5dp"
          android:background="@drawable/bg"
          android:layout_above="@+id/messageLayout" &gt;
  
          &lt;TextView 
          android:id="@+id/messagePreview"
          android:text="Message Preview will be shown here"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#b5b5b5"
          /&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/messageLayout"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:orientation="vertical"
      android:layout_alignParentBottom="true"&gt;
  &lt;Button
      android:id="@+id/addNumberButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBottom="@+id/messageLayout3"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:layout_marginTop="5dp"
      android:text="Contacts" /&gt;
  
  
  
  &lt;EditText
      android:id="@+id/enterMessage"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignBottom="@+id/messageLayout3"
      android:layout_toLeftOf="@+id/addNumberButton"
      android:ems="10"
      android:layout_marginTop="5dp"
      android:hint="Message" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <h2>    </h2>
  
  <p>The highlighted RelativeLayout (<strong>@+id/previewLayout</strong>)</p>
  
  <p><img src="https://i.stack.imgur.com/5EnMR.png" alt="enter image description here"></p>
  
  <p>should only go to the top of <em>this</em> RelativeLayout (<strong>@+id/messageLayout</strong>):</p>
  
  <p><img src="https://i.stack.imgur.com/OaF4T.png" alt="enter image description here"></p>
  
  <p>But it goes all the way to the bottom of the screen/parent. What did I do wrong?</p>