title: Android - Positioning TextView in RelativeLayout
body: <p>I'm making a small app for Android and I have a problem with the XAML.</p>
  
  <p>This is the XML layout code:</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" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".reverse_screen"
      android:textAllCaps="false"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"&gt;
          &lt;EditText
              android:text="Enter a message"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:id="@+id/hi_field"
              android:layout_height="wrap_content"
               /&gt;
          &lt;Button
              android:text="@string/button_send"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
      &lt;/LinearLayout&gt;
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textSize="20sp"
          android:text="Reversed:"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And this is how it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/XLcbS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XLcbS.png" alt="The problem"></a></p>
  
  <p>I want the TextView element to be below the EditText element in the LinearLayout, but the IDE doesn't allow me to do it since they're not in the same layout.</p>
  
  <p>I want to keep the LinearLayout in order to keep the EditText's weight to allow it to stretch horizontally, though.</p>
  
  <p>So how do I make the TextView in the RelativeLayout under the EditText in the LinearLayout? <code>android:layout_below</code> does not work since they are in different Layouts.</p>
  
  <p>How do I solve it?</p>