设置透明度(这是窗体本身的透明度,非背景) WindowManager.LayoutParams lp=getWindow().getAttributes(); lp.alpha=0.3f; getWindow().setAttributes(lp); alpha在0.0f到1.0f之间。1.0完全不透明,0.0f完全透明 设置黑暗度 WindowManager.LayoutParams lp=getWindow().getAttributes(); lp.dimAmount=0.5f; getWindow().setAttributes(lp); getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); dimAmount在0.0f和1.0f之间,0.0f完全不暗,1.0f全暗 设置背景模糊 getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND); 感谢:http://www.mangocd.com/