When I use
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
in my Activity I don’t get slightly blurred screen under current Activity but completely black one (top Activity is fine). Need to say it is also black in sample which came with SDK. Can somebody suggest how to make it blurry?
In your AndroidManifest.xml add this line to your Activity declaration:
android:theme="@android:style/Theme.Translucent.NoTitleBar"otherwise the activity will have a solid background (and thus blur has no effect).Also, this post on StackOverflow is helpful, in particular the cautionary notes. On older devices this causes your application to become unresponsive (it is a CPU-intense software rendering), and on newer devices this constant is deprecated and no longer has any effect (see Android Documentation for WindowManager.LayoutParams).
Deprecated on latest versions of OS (check documentation).