title: ConstraintLayout height with `wrap_content`
body: <p>I have the following xml:</p>
  
  <p>
  </p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/iv1"
      android:layout_width="0dp"
      android:layout_height="0dp"
      android:background="@color/gray"
      android:layout_margin="8dp"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toLeftOf="@id/iv2"
      app:layout_constraintDimensionRatio="1:1"
      /&gt;
  
  &lt;ImageView
      android:id="@+id/iv2"
      android:layout_width="0dp"
      android:layout_height="0dp"
      android:background="@color/red"
      android:layout_margin="8dp"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toRightOf="@id/iv1"
      app:layout_constraintRight_toLeftOf="@id/iv3"
      app:layout_constraintDimensionRatio="1:1"
      /&gt;
  
  &lt;ImageView
      android:id="@+id/iv3"
      android:layout_width="0dp"
      android:layout_height="0dp"
      android:layout_margin="8dp"
      android:background="@color/yellow"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toRightOf="@id/iv2"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintDimensionRatio="1:1"
      /&gt;
  </code></pre>
  
  <p></p>
  
  <p>which gives me the following in the layout preview:</p>
  
  <p><a href="https://i.stack.imgur.com/nQA9Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nQA9Z.png" alt="enter image description here"></a></p>
  
  <p>However, I intend for <code>ConstraintLayout</code> to be a child of a <code>RelativeLayout</code>, with <code>ConstraintLayout</code>'s height set to <code>wrap_content</code>. But setting <code>wrap_content</code> results in the entire <code>ConstraintLayout</code> shrinking to 0 in height. How do I make <code>wrap_content</code> work?</p>