title: Details of RelativeLayout in Android
body: <p>What is the best documentation for the RelativeLayout layout 
  algorithm? </p>
  
  <p>In the layout below, the edittext gets rendered on top of the textview. This seems 
  wrong since the EditText has android:layout_below="@id/textview". </p>
  
  <p>If I remove the android:layout_centerInParent="true" on the TextView, 
  then the EditText is pushed below the TextView. 
  Can anyone explain the algorithm that causes this to happen? 
  Is this the intended behavior?</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:id="@+id/main" 
          &gt; 
      &lt;RelativeLayout android:layout_width="wrap_content" 
                      android:layout_height="wrap_content" 
                      android:layout_centerInParent="true" 
                      android:id="@+id/inner" 
              &gt; 
          &lt;TextView 
                  android:id="@+id/textview" 
                  android:layout_centerInParent="true" 
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content" 
                  android:text="@string/hello" 
                  /&gt; 
          &lt;EditText 
                  android:layout_below="@id/textview" 
                  android:id="@+id/textfield" 
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content" 
                  android:text="@string/hello" 
                  /&gt; 
      &lt;/RelativeLayout&gt; 
  &lt;/RelativeLayout&gt; 
  </code></pre>