The easiest way to do this is that in your DialogFragment onCreate () method, call
setStyle(DialogFragment.STYLE_NO_FRAME, 0);
And if the view that you returned to onCreateView has no background, the background of the dialog will be just transparent.
Why? DialogFragment.STYLE_NO_FRAME means that the OS will not do any drawing in the dialog box, and your view is 100% responsible for drawing everything about the dialog.
Ian Wong Dec 29 '15 at 19:08 2014-12-29 19:08
source share