Add this code
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
Or this one instead:
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
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?
- Android DialogFragment vs 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?
- How to make custom dialog with rounded corners in android
- How do I maintain the Immersive Mode in Dialogs?
- How to create a number picker dialog?
- Get date from datepicker using dialogfragment
- 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
- Show dialog from fragment?
- How do I fire an event when click occurs outside a dialog
- Make a link in the Android browser start up my app?
- How do I get the web page contents from a WebView?
- How to show soft-keyboard when edittext is focused
- android: broadcast receiver for screen on and screen off
- How set maximum date in datepicker dialog in android?
- Google Maps Android API v2 – detect touch on map
- Android Spinner with multiple choice
- How to change Android minSdkVersion in flutter project
- Cannot retrieve field values from realm object, values are null in debugger
- About Android image and asset sizes
- Transfer data between iOS and Android via Bluetooth?
- What should I use Android AccountManager for?
- Quality problems when resizing an image at runtime
- Can an Android App connect directly to an online mysql database
- Android Fragment lifecycle over orientation changes
- What’s the Android ADB shell “dumpsys” tool and what are its benefits?
- Add shadow to custom shape on Android
- Can’t run a Java Android program with Valgrind
- How to set the language in speech recognition on android?
- What is the best way to authenticate two types of users (Student and Driver) in my android app using Firebase [duplicate]
- stuck with getting camera pic when using the tab Activity
- Android, How to limit width of TextView (and add three dots at the end of text)?
- How do I change screen orientation in the Android emulator?
- Error:Execution failed for task ‘:app:kaptDebugKotlin’
- Adding Tab inside Fragment In Android?
- How to keep android applications always be logged in state?
- Immutable bitmap crash error
- Google Drive API doesn’t play well with ProGuard (NPE)
- How to add debug symbols to build.gradle
- findFragmentById always returns null
- Only show number buttons on Soft Keyboard in Android?