I am creating a custom dialog with a background image with rounded corners. I delete the white border using a custom style, but it appears as if there was a black rectangle of the same size behind my image as shown below (the background image of the dialog is brown):

How can I keep the transparent background of my image with round corners?
Layout of my dialog:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/confirmation" android:orientation="vertical" android:background="@drawable/dialog_background" android:layout_width="279dp" android:layout_height="130dp" > ...
I remove the white border by applying the following style to my dialog:
<style name="Theme_Dialog_Translucent" parent="android:Theme.Dialog"> <item name="android:windowBackground">@null</item> </style>
My CustomDialog class:
public class CustomDialog extends Dialog implements OnClickListener { Button okButton; public CustomDialog(Context context) {
source share