How to achieve blurred background visual effect [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this questionPlease do you know how to achieve this effect (blur on the background) in Android?
My HTC WildFire does this when is about to be turned off
I googled for "android blur background" and found this blog post. Basically:
dialog = new AlertDialog.Builder(this). /*... setTitle and so on ...*/ ;
WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.dimAmount=0.0f; // this sets the amount of darkening
dialog.getWindow().setAttributes(lp);
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
精彩评论