title: RelativeLayout and margin?
body: <p>I added a <code>View</code> to my <code>RelativeLayout</code> and I set 300dp margin left
  then I added another view but the second view is not affected by the margin of the first. Why ?</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;TextView
          android:id="@+id/text"
          android:layout_width="200dp"
          android:layout_height="200dp"
          android:layout_marginLeft="300dp"
          android:background="@color/colorPrimaryDark"
          android:text="use margin left view 1"
          android:textSize="40sp" /&gt;
  
      &lt;TextView
          android:layout_width="290dp"
          android:layout_height="200dp"
          android:background="@color/colorPrimaryDark"
          android:text="not affected by margin view 2 "
          android:textSize="40sp" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/iZaRP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iZaRP.png" alt="enter image description here"></a></p>