title: LinearLayout, RelativeLayout, etc. margins do not work as expected
body: <p>Margins in group layouts do not seem to work.</p>
  
  <p>For example,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_margin="40dip"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;Button
          android:id="@+id/button"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:text="I'm a button" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>should display a button with 40p margins on all sides. However, it has 80p margins on the right and bottom.</p>
  
  <p>Am I doing something wrong?
  Is this a bug? </p>
  
  <p>A workaround would be to use gravity, but this only works with even margins.</p>
  
  <p>BTW, there is a similar question <a href="https://stackoverflow.com/questions/1818633/relativelayout-margins-inside-a-listview-are-not-displayed">posted here</a> but has not been answered.</p>