title: Wrong Android studio preview behavior
body: <p>I have layout with two layers, background and content (constraint layout and image):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/colorPrimary"
      android:id="@+id/background_layout"&gt;
  
  
  
      &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:id="@+id/content_layout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="150dp"
          android:gravity="center_horizontal"
          app:layout_constraintTop_toBottomOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          android:elevation="20dp"
          android:background="@color/backgroundColor"&gt;
  
      &lt;com.google.android.material.card.MaterialCardView
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_alignParentTop="true"
          android:translationY="50dp"
          app:cardCornerRadius="50dp"
          app:layout_constraintBottom_toTopOf="@+id/relativeLayout2"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          android:elevation="21dp"
          app:cardElevation="21dp"&gt;
  
          &lt;ImageView
              android:id="@+id/circular_image"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:scaleType="fitCenter"
              android:src="@mipmap/ic_launcher" /&gt;
      &lt;/com.google.android.material.card.MaterialCardView&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>It should be like <a href="https://i.stack.imgur.com/NB77B.png" rel="nofollow noreferrer">image</a>.
  When I delete that line in CardView</p>
  
  <pre><code>    android:elevation="21dp"
  </code></pre>
  
  <p>Preview <a href="https://i.stack.imgur.com/QgerZ.png" rel="nofollow noreferrer">says</a> that image is under content but in emulator nothing changes...</p>
  
  <p>Ok, if we add android:elevation and delete app:cardElevation image will be under content-layout in emulator and over that in preview.</p>
  
  <p>My question is what happening?</p>