问题
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