见到了贴上,以后用的到
WindowManager.LayoutParams lp =getWindow().getAttributes(); lp.screenBrightness=1.0f; getWindow().setAttributes(lp);范围0-1
backgroundAlpha(1.0f);
/** * 设置添加屏幕的背景透明度 * * @param bgAlpha 透明度 */ public void backgroundAlpha(float bgAlpha) { WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.alpha = bgAlpha; getWindow().setAttributes(lp); }