title: Circular dependencies cannot exist in RelativeLayout, android?
body: <p>I have the following layout:
  I need to keep the button at the bottom of screen and it should be visible to the user. 
  The rest of the layout should scroll.</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:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="com.vfc.sargroup.SalesOrderActivity$PlaceholderFragment" &gt;
  
  &lt;ScrollView
      android:id="@+id/scrollView1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_above="@+id/bottomLinearLayout" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Select Distributor Name"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;Spinner
              android:id="@+id/spinner1"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Payment Collection"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ems="10" &gt;
          &lt;/EditText&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Product Category"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ems="10" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
  
          &lt;TableLayout
              android:id="@+id/salesTableLayout"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_marginLeft="20dp"
              android:layout_marginRight="20dp"
              android:stretchColumns="*" &gt;
          &lt;/TableLayout&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Total QTY"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ems="10" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Total Price"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ems="10" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Remark"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ems="10" &gt;
          &lt;/EditText&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  
  &lt;LinearLayout
      android:id="@+id/bottomLinearLayout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_below="@+id/scrollView1"
      android:layout_centerHorizontal="true"
      android:orientation="vertical" &gt;
  
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Submit" /&gt;
  &lt;/LinearLayout&gt;
    &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I just need to do scroll my view and keep the button appeared on the screen at the bottom.</p>
  
  <p>The problem is with </p>
  
  <pre><code>     android:layout_above="@+id/bottomLinearLayout"
  </code></pre>
  
  <p>I get the error </p>
  
  <pre><code>     Circular dependencies cannot exist in RelativeLayout
  </code></pre>
  
  <p>What is wrong with my layout?</p>