keep the margin when the referenced view is gone in ConstraintLayout : <p>I have 2 TextViews as in the xml below.
If I hide the <code>textView2</code> at runtime, I lose the bottom margin.
How can I keep the bottom margin between <code>textView</code> and parent to be 16dp when the <code>textView2</code> is gone.</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="wrap_content"&gt;

  &lt;TextView
      android:id="@+id/textView"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:layout_marginBottom="16dp"
      android:layout_marginEnd="8dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="8dp"
      android:text="abc"
      app:layout_constraintBottom_toTopOf="@+id/textView2"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintVertical_chainStyle="packed"
      /&gt;

  &lt;TextView
      android:id="@+id/textView2"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:layout_marginBottom="32dp"
      android:layout_marginEnd="8dp"
      android:layout_marginStart="8dp"
      android:text="xyz"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/textView"
      app:layout_constraintVertical_chainStyle="packed"/&gt;
&lt;/android.support.constraint.ConstraintLayout&gt;
</code></pre>
