Q:

Alternative to the deprecated FLAG_BLUR_BEHIND flag for dimming background of Dialog

I'm trying to dim/blur the backgruond BEHIND a Dialog box.  In the past, I've used this code:
dialog.getWindow().addFlags(WindowManager. LayoutParams. FLAG_BLUR_BEHIND);

But as this question states, the WindowManager. LayoutParams. FLAG_BLUR_BEHIND flag is now deprecated as of API 14.  Is there a way I can dim the background of a Dialog box NOT using this flag?  Thanks

A:

Try
getWindow().addFlags(WindowManager. LayoutParams. FLAG_DIM_BEHIND) 

Another alternative:
getWindow().setBackground(new ColorDrawable(0x7000000))

