Alternative to "FLAG_BLUR_BEHIND" in Android?

android developer picture android developer · Apr 29, 2012 · Viewed 22.3k times · Source

I can see that when I use the same flag as shown on the API-demos for blurring the background, I get a warning that it's deprecated:

"The field WindowManager.LayoutParams.FLAG_BLUR_BEHIND is deprecated".

I've read about it, and I've found that "Blurring is no longer supported".

Does it mean that it won't work on future versions? Why did they deprecate it? Is there an alternative? I really like this feature.

Answer

android developer picture android developer · Apr 30, 2012

ok , there is probably no alternative that uses the API , unless maybe i've forgetting anything.

i can however use dimming , which is cool too, as written here:

WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();  
lp.dimAmount=0.0f;  
dialog.getWindow().setAttributes(lp);  
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);