getWindow()
is a dialog class method, not a dialog builder. Your code should look something like this:
AlertDialog dlg = eula.show(); WindowManager.LayoutParams lp = dlg.getWindow().getAttributes(); lp.dimAmount = 0.0F; dlg.getWindow().setAttributes(lp); dlg.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
Please note that the constant FLAG_BLUR_BEHIND
now deprecated, blurring outside the windows is no longer supported . Thus, your code may break in the future.
user658042
source share