title: Android ConstraintLayout: Views not respecting margins
body: <p>I am attempting to create a layout where various pieces of data are separated by a line (View), but the design requires an equal top and bottom spacing from the line.  I am trying to use margins to accomplish this, but I am not getting the results I expected.  Based on the <a href="https://developer.android.com/reference/android/support/constraint/ConstraintLayout#Margins" rel="nofollow noreferrer">official documentation</a>, as long as the constraints are set for the margin direction, they should be respected.  For some reason the top margin gives us the correct spacing, however the bottom margin does not give any spacing at all.  I have created a sample containing only the pertinent layout axml to reproduce, along with a large enough margin to visualize the issue:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:padding="20dp"&gt;
      &lt;TextView android:text="NAME"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/account_name_label"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintBottom_toBottomOf="parent"
          /&gt;
      &lt;TextView android:text="Your Name"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/account_name"
          app:layout_constraintTop_toBottomOf="@+id/account_name_label"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          /&gt;
      &lt;View
          android:id="@+id/line1"
          app:layout_constraintTop_toBottomOf="@+id/account_name"
          app:layout_constraintBottom_toTopOf="@+id/account_joined_label"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          android:layout_width="0dp"
          android:layout_height="1dp"
          android:background="#000000"
          android:layout_marginTop="100dp"
          android:layout_marginBottom="100dp"
          /&gt;
      &lt;TextView android:text="JOINED"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/account_joined_label"
          app:layout_constraintTop_toBottomOf="@+id/line1"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          /&gt;
      &lt;TextView android:text="January 1, 2019"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/account_joined"
          app:layout_constraintTop_toBottomOf="@+id/account_joined_label"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          /&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>The above results in the following, visually:
  <a href="https://i.stack.imgur.com/NYUz3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NYUz3.png" alt="ConstraintLayout margin issue"></a></p>
  
  <p>Now, I can add the <code>android:layout_marginTop="100dp"</code> to the first TextView after the line View to "fix" this, however I want to reuse the styles for the line View, without having to worry about remembering to add a top margin to whatever happens to be the first View after the line View.  What am I missing?</p>
  
  <p><strong>Update:</strong> Here is what the layout SHOULD look like:</p>
  
  <p><a href="https://i.stack.imgur.com/ENPBM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ENPBM.png" alt="ConstraintLayout corrected layout"></a></p>