I have a Password Dialogue and, to prevent "peeking", I would like to hide the screen behind the window.
The best I could come up with was the following code to Blur the screen's contents:
Window window = dialog.getWindow();
LayoutParams layoutParams = window.getAttributes();
layoutParams.dimAmount = 1.0f;
layoutParams.flags = layoutParams.flags | WindowManager.LayoutParams.FLAG_BLUR_BEHIND;
window.setAttributes(layoutParams);
Unfortunately, while this works fine on the majority of devices, on certain Motorola devices this causes a terrible slowdown of the screen composing to the point where the password entry field is unusable. (Yes, I verified this is the cause, as removing the blurring code fixes the slowdown.)
Anyways, I would like to find a way to make the screen behind the dialog blank (or any solid color). I had been unable to find a solution to this.