title: Android, layout_above not working
body: <p>I want to display some text in the middle of the screen, below header and above footer. Since this text is very long I nested it in ScrollView. I have tried a number of solutions: <a href="https://stackoverflow.com/questions/11616390/android-relativelayout-overlapping">this</a>, <a href="https://stackoverflow.com/questions/17968344/how-to-avoid-overlap-view-in-relative-layout-in-android">this</a>, <a href="https://stackoverflow.com/questions/8271406/how-to-make-a-static-button-under-a-scrollview">this</a>, <a href="https://stackoverflow.com/questions/16973327/first-view-above-overlapping-second-in-linearlayout">this</a>, and a bunch more...</p>
  
  <p>At first I had a problem of the two relative_layouts overlapping and text being cut of. The most accepted answer is to use <code>layout_above</code> and <code>layout_below</code>, but <strong><em>when I use layout_above, the text is never displayed</em></strong>.</p>
  
  <p>This is what my xml looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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:orientation="vertical"&gt;
  
  &lt;RelativeLayout
      android:id="@+id/linear_layout_header"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/gray"
      android:baselineAligned="false"
      android:orientation="horizontal"
      android:padding="5dp"
      android:weightSum="3"&gt;
  
          &lt;ImageView
              android:id="@+id/profile_image"
              android:layout_width="80dp"
              android:layout_height="80dp"
              android:layout_margin="10dp"
              android:contentDescription="@string/profile_photo"
              android:src="@drawable/default_profile"
              tools:ignore="RtlHardcoded" /&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/scrollViewAndStuff"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_above="@+id/ln_layout_footer"
      android:layout_below="@+id/linear_layout_header"&gt;
  
      &lt;ScrollView
          android:id="@+id/scrollView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          android:layout_marginTop="10dp"
          tools:ignore="UselessParent"&gt;
  
          &lt;TextView
              android:id="@+id/meetupDescription"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginLeft="5dp"
              android:text="@string/text"/&gt;-
      &lt;/ScrollView&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/ln_layout_footer"
      android:layout_width="match_parent"
      android:layout_alignParentBottom="true"
      android:layout_height="match_parent"
      android:gravity="bottom"
      android:orientation="horizontal"
      android:paddingTop="10dp"&gt;
  
      &lt;LinearLayout
          android:id="@+id/ln_layout"
          android:layout_width="fill_parent"
          android:background="@color/gray"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:paddingBottom="5dp"
          android:paddingTop="5dp"&gt;
  
          &lt;TextView
              android:id="@+id/red"
              android:textColor="@color/white"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:gravity="center"
              android:text="@string/red" /&gt;
  
          &lt;TextView
              android:id="@+id/blue"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:textColor="@color/white"
              android:layout_weight="1"
              android:gravity="center"
              android:text="@string/blue" /&gt;
  
          &lt;TextView
              android:id="@+id/green"
              android:layout_width="match_parent"
              android:textColor="@color/white"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:gravity="center"
          android:text="@string/green" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>