title: Remove custom dialog color outside the rounded corner in android
body: <p>I'm trying to apply rounded corners to my custom dialog. Dialog shows the rounded corners correctly but the outer space of corner is turned into white.</p>
  <p><strong>drawable/dialog_message_background</strong></p>
  <pre><code>&lt;shape xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;solid
          android:color=&quot;?postCardBackground&quot;/&gt; //light black color
      &lt;corners
          android:radius=&quot;30dp&quot; /&gt;
      &lt;padding
          android:left=&quot;10dp&quot;
          android:top=&quot;10dp&quot;
          android:right=&quot;10dp&quot;
          android:bottom=&quot;10dp&quot; /&gt;
  &lt;/shape&gt;
  </code></pre>
  <p><strong>My layout</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;RelativeLayout
  
      android:background=&quot;@drawable/dialog_message_background&quot;
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;&gt;
  
      &lt;LinearLayout
          android:background=&quot;@drawable/dialog_message_background&quot;
          android:orientation=&quot;vertical&quot;
          android:gravity=&quot;center&quot;
          android:layout_centerInParent=&quot;true&quot;
          android:layout_width=&quot;250dp&quot;
          android:layout_height=&quot;wrap_content&quot;&gt;
  
          &lt;TextView
              android:id=&quot;@+id/dialogMessageTv&quot;
                  android:text=&quot;Error occured&quot;
                  android:maxLines=&quot;3&quot;
                  android:textStyle=&quot;bold&quot;
                  android:textColor=&quot;?attr/postUserNameColor&quot;
                  android:textSize=&quot;18sp&quot;
                  android:layout_gravity=&quot;center&quot;
                  android:gravity=&quot;center&quot;
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;wrap_content&quot;/&gt;
          
  
          &lt;ImageView
              android:layout_marginTop=&quot;20dp&quot;
              android:id=&quot;@+id/messageDialogImg&quot;
              android:layout_width=&quot;70dp&quot;
              android:layout_height=&quot;70dp&quot; /&gt;
  
          &lt;Button
              android:id=&quot;@+id/messageDialogOkBtn&quot;
              android:layout_marginTop=&quot;20dp&quot;
              android:layout_marginBottom=&quot;5dp&quot;
              android:background=&quot;@drawable/dark_purple_btn_back&quot;
              android:text=&quot;ok&quot;
              android:textStyle=&quot;bold&quot;
              android:textSize=&quot;18sp&quot;
              android:textColor=&quot;@color/white&quot;
              android:layout_width=&quot;150dp&quot;
              android:layout_height=&quot;40dp&quot; /&gt;
      &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  <p><strong>Output window</strong></p>
  <p><a href="https://i.stack.imgur.com/NlIe4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NlIe4.png" alt="Output screen showing white corners outside dialog" /></a></p>
  <p>Help me to remove the white color outside the custom dialog.</p>