title: FrameLayout wrap_content in ConstraintLayout
body: <p>My <code>FrameLayout</code> inside a <code>CoordinatorLayout</code> doesn't want to be <code>wrap_content</code>. When I select <code>wrap_content</code> with the ui tool it does not set it to <code>wrap_content</code> but set a defined height of <strong>48dp</strong>.</p>
  
  <p>I also tried to set it directly in the xml file and it works... Until I reopen the file. I suppose AS's editor is doing some work and reset its height to <strong>48dp</strong>.</p>
  
  <p>This is how my layout looks like : </p>
  
  <pre><code>&lt;layout
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
      &lt;data&gt;
  
          &lt;import type="android.view.View" /&gt;
          &lt;variable
              name="viewModel"
              type="com.mydomain.relationViewModel" /&gt;
  
      &lt;/data&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;ProgressBar
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:indeterminate="true"
              android:layout_centerInParent="true"
  
              android:visibility="@{viewModel.isLoading() ? View.VISIBLE : View.GONE}"/&gt;
  
          &lt;android.support.constraint.ConstraintLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:visibility="@{viewModel.isLoading() ? View.INVISIBLE : View.VISIBLE}"&gt;
  
              &lt;TextView
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:id="@+id/hint"
                  tools:text="Relation"
                  android:layout_marginStart="16dp"
                  app:layout_constraintLeft_toLeftOf="parent"
                  android:layout_marginLeft="16dp"
                  android:text="@string/relationship_spinner_hint"
                  android:layout_marginTop="16dp"
                  app:layout_constraintTop_toTopOf="parent"
                  app:layout_constraintBottom_toBottomOf="@+id/spinner" /&gt;
  
              &lt;Spinner
                  android:layout_width="0dp"
                  android:layout_height="48dp"
                  android:id="@+id/spinner"
                  android:dropDownWidth="match_parent"
                  android:layout_marginEnd="16dp"
                  app:layout_constraintRight_toRightOf="parent"
                  android:layout_marginRight="16dp"
                  app:layout_constraintLeft_toRightOf="@+id/hint"
                  android:layout_marginStart="16dp"
                  android:layout_marginLeft="16dp"
                  android:layout_marginTop="16dp"
                  app:layout_constraintTop_toTopOf="parent"
  
                  app:setOnItemSelectedListener="@{viewModel.relationshipsListener}"/&gt;
  
              &lt;FrameLayout
                  android:layout_width="0dp"
                  android:layout_height="48dp"
                  app:layout_constraintRight_toRightOf="parent"
                  app:layout_constraintLeft_toLeftOf="parent"
                  android:id="@+id/search_fragment_container"
                  android:layout_marginEnd="16dp"
                  android:layout_marginRight="16dp"
                  app:layout_constraintHorizontal_bias="0.0"
                  app:layout_constraintTop_toBottomOf="@+id/search_patient_title"&gt;
  
              &lt;/FrameLayout&gt;
  
              &lt;Button
                  android:text="@string/cancel"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/cancel"
                  app:layout_constraintLeft_toLeftOf="parent"
                  style="@style/buttonStyle"
                  android:layout_marginTop="8dp"
                  app:layout_constraintTop_toBottomOf="@+id/search_fragment_container" /&gt;
  
              &lt;TextView
                  android:text="@string/search_patient"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/search_patient_title"
                  android:layout_marginTop="8dp"
                  app:layout_constraintTop_toBottomOf="@+id/spinner"
                  android:layout_marginStart="16dp"
                  app:layout_constraintLeft_toLeftOf="parent"
                  android:layout_marginLeft="16dp"
                  tools:text="Recherche du patient"
                  style="@style/myTitle" /&gt;
  
          &lt;/android.support.constraint.ConstraintLayout&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/layout&gt;
  </code></pre>
  
  <p>And here is a screenshot of my blueprint (where the selected layout is the <code>FrameLayout</code>):</p>
  
  <p><a href="https://i.stack.imgur.com/Zpu4W.png" rel="nofollow"><img src="https://i.stack.imgur.com/Zpu4W.png" alt="Blueprint"></a></p>
  
  <p>Thank's for any further help !</p>
  
  <p><strong>EDIT</strong>
  Got the same issue with CardView (seems legit since it's a FrameLayout child).</p>