title: Cardview shows shadow as margin in API < 21
body: <p>I using androidx in my project. in android api 21 and above all thing is good but in below that cardView don't work properly.
  please see images:
  in android API > 21 :</p>
  
  <p><a href="https://i.stack.imgur.com/mQEmM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mQEmM.png" alt="enter image description here"></a></p>
  
  <p>and in API 19:</p>
  
  <p><a href="https://i.stack.imgur.com/otf8U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/otf8U.png" alt="enter image description here"></a></p>
  
  <p>is <code>CardView</code> work only in api 21 and above?</p>
  
  <p>my xml file is:</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:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity"&gt;
  
  
      &lt;androidx.cardview.widget.CardView
          android:id="@+id/searchBoxContainer"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:cardBackgroundColor="@color/colorPrimary"
          app:cardCornerRadius="0dp"
          app:cardElevation="4dp"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"
              android:padding="10dp"&gt;
  
              &lt;androidx.cardview.widget.CardView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  app:cardUseCompatPadding="true"&gt;
  
                  &lt;EditText
                      android:id="@+id/searchBox"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_weight="1"
                      android:background="#00000000"
                      android:gravity="left"
                      android:hint="search"
                      android:imeOptions="actionSearch"
                      android:inputType="textPhonetic"
                      android:padding="15dip"
                      android:selectAllOnFocus="false"
                      android:singleLine="true"
                      android:textColor="#000"
                      android:textColorHint="#a5a5a5"
                      android:textIsSelectable="true"
                      android:textSize="16sp" /&gt;
  
              &lt;/androidx.cardview.widget.CardView&gt;
  
  
          &lt;/LinearLayout&gt;
  
      &lt;/androidx.cardview.widget.CardView&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Hello World!"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
      &lt;androidx.cardview.widget.CardView
          android:id="@+id/bottom_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:layout_constraintBottom_toBottomOf="parent"
          android:clickable="true"
          android:focusable="true"
          app:cardElevation="8dp"
          &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:layout_marginLeft="48dp"
              android:layout_marginRight="48dp"
              android:orientation="horizontal"
              android:layout_marginTop="8dp"
              android:layout_marginBottom="8dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"&gt;
  
              &lt;LinearLayout
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@mipmap/ic_launcher"
                      /&gt;
              &lt;/LinearLayout&gt;
  
              &lt;LinearLayout
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:gravity="center"&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@mipmap/ic_launcher"
                      /&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/androidx.cardview.widget.CardView&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>