How to achieve blurred background visual effect [closed]

烂漫一生 提交于 2019-12-08 13:55:37

问题


Please 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


回答1:


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


来源:https://stackoverflow.com/questions/5211451/how-to-achieve-blurred-background-visual-effect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!