title: marginTop does not work with ConstraintLayout and wrap_content
body: <p>In my Fragment I have a ConstraintLayout with <code>layout_height=&quot;wrap_content&quot;</code> and I would like to have a margin between my two buttons at the bottom of the view.</p>
  <p>When I add this margin as <code>layout_marginBottom</code> to the upper button (<strong>button_welcome_signup</strong>) it seems to work fine. However, if I try to add it to the bottom button (<strong>button_welcome_signin</strong>) as <code>layout_marginTop</code> it doesn't work.</p>
  <p>Does anybody know what the issues here is / if am doing something wrong?</p>
  <p><em>(Please note there is a reason why I am using wrap_content and also that I would seriously like to use the margin on the bottom button, so I can add some margin to its style for better UI consistency within my project).</em></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:MyAppApp=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_gravity=&quot;center_vertical&quot;
      android:background=&quot;@color/white&quot;
      android:minHeight=&quot;@dimen/min_height_welcome_frame&quot;
      android:padding=&quot;@dimen/margin_all_frame_inner&quot;&gt;
  
      &lt;ImageView
          android:id=&quot;@+id/imageview_welcome_logo&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;50dp&quot;
          android:adjustViewBounds=&quot;true&quot;
          android:scaleType=&quot;fitCenter&quot;
          android:src=&quot;@drawable/logo_header&quot;
          MyAppApp:layout_constraintTop_toTopOf=&quot;parent&quot;
          MyAppApp:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          MyAppApp:layout_constraintRight_toRightOf=&quot;parent&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textiew_welcome_title&quot;
          style=&quot;@style/MyAppTextViewTitle&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginTop=&quot;@dimen/margin_all_component_l&quot;
          android:text=&quot;@string/welcome_title&quot;
          MyAppApp:layout_constraintTop_toBottomOf=&quot;@id/imageview_welcome_logo&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textview_welcome_text&quot;
          style=&quot;@style/MyAppTextViewText&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:text=&quot;@string/welcome_message&quot;
          MyAppApp:layout_constraintTop_toBottomOf=&quot;@id/textiew_welcome_title&quot; /&gt;
  
      &lt;Button
          android:id=&quot;@+id/button_welcome_signin&quot;
          style=&quot;@style/MyAppSubButton&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;46dp&quot;
          android:layout_marginTop=&quot;@dimen/margin_all_component_s&quot; 
          android:text=&quot;@string/welcome_sign_in&quot;
          MyAppApp:layout_constraintBottom_toBottomOf=&quot;parent&quot; /&gt;
  
      &lt;Button
          android:id=&quot;@+id/button_welcome_signup&quot;
          style=&quot;@style/MyAppButton&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;46dp&quot;
          android:layout_marginTop=&quot;@dimen/margin_all_component_l&quot;
          android:text=&quot;@string/welcome_sign_up&quot;
          MyAppApp:layout_constraintBottom_toTopOf=&quot;@id/button_welcome_signin&quot;
          MyAppApp:layout_constraintTop_toBottomOf=&quot;@id/textview_welcome_text&quot;
          MyAppApp:layout_constraintVertical_bias=&quot;1&quot; /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  <p>styles.xml:</p>
  <pre><code>&lt;style name=&quot;MyAppButton&quot; parent=&quot;Widget.AppCompat.Button&quot;&gt;
      &lt;item name=&quot;android:background&quot;&gt;@drawable/button_selector_blue&lt;/item&gt;
      &lt;item name=&quot;android:textSize&quot;&gt;@dimen/textsize_all_l&lt;/item&gt;
      &lt;item name=&quot;android:textColor&quot;&gt;@color/white&lt;/item&gt;
      &lt;item name=&quot;fontFamily&quot;&gt;@font/my_sans_serif_regular&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;MyAppSubButton&quot; parent=&quot;Widget.AppCompat.Button&quot;&gt;
      &lt;item name=&quot;android:background&quot;&gt;@drawable/button_selector_transparent&lt;/item&gt;
      &lt;item name=&quot;android:textSize&quot;&gt;@dimen/textsize_all_l&lt;/item&gt;
      &lt;item name=&quot;android:textColor&quot;&gt;@color/turquoise_blue&lt;/item&gt;
      &lt;item name=&quot;fontFamily&quot;&gt;@font/my_sans_serif_regular&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>