Add this code
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
Or this one instead:
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
More Related Contents:
- How to create a Custom Dialog box in android?
- How to prevent a dialog from closing when a button is clicked
- Android Activity as a dialog
- How do I display an alert dialog on Android?
- How to handle screen orientation change when progress dialog and background thread active?
- Android 1.6: “android.view.WindowManager$BadTokenException: Unable to add window — token null is not for an application”
- How to dismiss the dialog with click on outside of the dialog?
- How to show a dialog to confirm that the user wishes to exit an Android Activity?
- How to display progress dialog before starting an activity in Android?
- Android DialogFragment vs Dialog
- How do I maintain the Immersive Mode in Dialogs?
- Get date from datepicker using dialogfragment
- How to create a number picker dialog?
- Android ‘Unable to add window — token null is not for an application’ exception
- Change background of ProgressDialog
- findViewById() returns null for Views in a Dialog
- How to make custom dialog with rounded corners in android
- How do I fire an event when click occurs outside a dialog
- AlertDialog with positive button and validating custom EditText
- Show dialog activity over another app from background
- Show dialog from fragment?
- Android Take Screenshot of Surface View Shows Black Screen
- How to inflate one view with a layout
- Difference between /res and /assets directories
- Software keyboard resizes background image on Android
- How to make ConstraintLayout work with percentage values?
- How to draw free hand polygon in Google map V2 in Android?
- IllegalStateException: The application’s PagerAdapter changed the adapter’s content without calling PagerAdapter#notifyDataSetChanged
- Ionic 5/Capacitor ERR_CLEARTEXT_NOT_PERMITTED in Android
- How can I get the application’s icon from the package name?