title: Persistent Bottom Sheet with rounded corners in Android crashes when used in a card view
body: <p>I have created a persistent bottom sheet in android with the intent of displaying a ListView containing additional information about locations. I want the sheet to have rounded corners. I got a ton of results for modal dialog but none for persistent. Is it possible or should I use the modal version? </p>
  
  <p>As suggested in an answer here, I tried wrapping it in a card view but the app crashes when I try to open the fragment.</p>
  
  <pre class="lang-xml prettyprint-override"><code>
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.coordinatorlayout.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:orientation="vertical"
      tools:context=".fragments.MapFragment"&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;androidx.cardview.widget.CardView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_margin="5dp"
              app:cardCornerRadius="20dp"&gt;
  
              &lt;fragment
                  android:id="@+id/autocomplete_fragment"
                  android:name="com.google.android.libraries.places.widget.AutocompleteSupportFragment"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  tools:layout="@layout/places_autocomplete_item_powered_by_google" /&gt;
  
          &lt;/androidx.cardview.widget.CardView&gt;
  
          &lt;com.google.android.gms.maps.MapView
              android:id="@+id/mapView"
              android:layout_width="match_parent"
              android:layout_height="match_parent" /&gt;
  
      &lt;/RelativeLayout&gt;
  
      &lt;androidx.cardview.widget.CardView
          android:layout_width="match_parent"
          android:layout_height="450dp"
          app:cardCornerRadius="24dp"
          app:cardElevation="8dp"
          app:layout_behavior="@string/bottom_sheet_behavior"
          app:behavior_hideable="true"
          app:behavior_peekHeight="55dp"&gt;
  
          &lt;androidx.core.widget.NestedScrollView
              android:id="@+id/bottom_sheet"
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
  
              &lt;TextView
                  android:id="@+id/tvBottomSheet"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="@string/placeholder_text"
                  android:textColor="@color/colorCommon_BLACK"
                  android:textSize="37sp" /&gt;
  
          &lt;/androidx.core.widget.NestedScrollView&gt;
  
      &lt;/androidx.cardview.widget.CardView&gt;
  
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  </code></pre>