title: Android round corner layout in dialogfragment
body: <p>I want to make a dialog fragment with corners.
  The problem I have</p>
  
  <p><img src="https://i.stack.imgur.com/HSixG.png" alt="enter image description here"></p>
  
  <p>As you see, if a TextView in on top, there will be some parts of it that is over the transparent part of the dialog, which is bad.
  This also happens with that scrolling bar from the listview.
  I want to "cut" that parts..or mask them like in the second photo.
  Is this possible?</p>
  
  <p>shape</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"&gt;
      &lt;solid android:color="#FFF" /&gt;
      &lt;corners android:topLeftRadius="20dp" android:topRightRadius="20dp"
          android:bottomLeftRadius="20dp" android:bottomRightRadius="20dp"/&gt;
      &lt;stroke android:color="#7F7F7F" android:width="1dp" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>I'm using a linear layout for the fragment, with the above background.
  I call </p>
  
  <pre><code>getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
          getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
  </code></pre>
  
  <p>To get rid of the background color &amp; title bar.</p>