title: Layout background is not clipped according to background drawable in BottomSheet layout
body: <p>I want to make the layout of a BottomSheet with rounded corners, but setting a drawable with corner radius does not clip the layout background.
  I am using a <code>BottomSheetDialogFragment</code>.</p>
  <p><strong>fragment_a.xml</strong></p>
  <pre><code>&lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:background=&quot;@drawable/round_rectangle&quot;&gt;
     &lt;!-- other views here --&gt;
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p><strong>round_rectangle.xml</strong></p>
  <pre><code>&lt;shape
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:shape=&quot;rectangle&quot;   &gt;
      &lt;solid
          android:color=&quot;@android:color/white&quot; /&gt;
      &lt;stroke
          android:width=&quot;2dp&quot;
          android:color=&quot;#C4CDE0&quot; /&gt;
      &lt;padding
          android:left=&quot;0dp&quot;
          android:right=&quot;0dp&quot;
          android:top=&quot;0dp&quot;
          android:bottom=&quot;0dp&quot; /&gt;
      &lt;corners
          android:topLeftRadius=&quot;16dp&quot;
          android:topRightRadius=&quot;16dp&quot; /&gt;
  &lt;/shape&gt;
  </code></pre>
  <p>Current result:</p>
  <p><a href="https://i.stack.imgur.com/FEt9c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FEt9c.png" alt="uncliped layout" /></a></p>
  <p><strong>Tried:</strong></p>
  <p>Clipping programetically using</p>
  <pre><code>view.clipToOutline = true
  </code></pre>
  <p>Please help! Thanks in advance!</p>