title: Android RelativeLayout layout_toLeftOf doesn't work as expected
body: <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:background="#cccccc"&gt;
  
       &lt;!-- LEFT --&gt;
      &lt;FrameLayout 
          android:layout_marginTop="50px"
          android:layout_marginLeft="50px"
          android:layout_width="50px"
          android:layout_height="50px"
          android:background="#ff0000"
          android:id="@+id/lp" /&gt;
  
      &lt;FrameLayout 
          android:layout_width="50px" 
          android:layout_height="100px" 
          android:background="#00ff00"
          android:layout_toRightOf="@id/lp"
          android:layout_alignTop="@id/lp"
          android:id="@+id/lc" /&gt;        
      &lt;!-- END LEFT --&gt;
  
      &lt;!-- RIGHT --&gt;
      &lt;FrameLayout 
          android:layout_marginTop="50px"
          android:layout_marginLeft="300px"
          android:layout_width="50px"
          android:layout_height="50px"
          android:background="#ff0000"
          android:id="@+id/rp" /&gt;
  
      &lt;FrameLayout 
          android:layout_width="50px" 
          android:layout_height="100px" 
          android:background="#00ff00"
          android:layout_toLeftOf="@id/rp"
          android:layout_alignTop="@id/rp"
          android:id="@+id/rc" /&gt;        
      &lt;!-- END LEFT --&gt;    
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The result is:</p>
  
  <p><img src="https://i.stack.imgur.com/cFGFJ.png" alt="enter image description here"></p>
  
  <p>What I expect is:</p>
  
  <p><img src="https://i.stack.imgur.com/kR6Jn.png" alt="enter image description here"></p>
  
  <p>Why doesn't it work?</p>