I\'m trying to get the background of a DialogFragment
to be completely clear.
With setting the style item android:windowIsFloating
to true
What works for me is to adjust the WinowManager.LayoutParams
in onStart()
of the DialogFragment:
@Override public void onStart() {
super.onStart();
Window window = getDialog().getWindow();
WindowManager.LayoutParams windowParams = window.getAttributes();
windowParams.dimAmount = 0.90f;
windowParams.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND;
window.setAttributes(windowParams);
}