在1.5SDK以上版本中
WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
layoutParams.screenBrightness = 0.0f;//最暗,1.0f最亮
getWindow().setAttributes(layoutParams);
在1.5SDK以上版本中
WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
layoutParams.screenBrightness = 0.0f;//最暗,1.0f最亮
getWindow().setAttributes(layoutParams);