开发者

How to achieve blurred background visual effect [closed]

开发者 https://www.devze.com 2023-02-14 22:43 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_StackOverflow中文版
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_StackOverflow中文版

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 question

Please do you know how to achieve this effect (blur on the background) in Android?

How to achieve blurred background visual effect [closed]

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消