android 应用级别 亮度调节

来源:互联网 发布:python工具书 编辑:程序博客网 时间:2024/05/21 20:51
        Window localWindow = getWindow();
        WindowManager.LayoutParams localLayoutParams = localWindow.getAttributes();
        localLayoutParams.screenBrightness = 0.5.0f;  //(范围0-1, 值为-1时是自动调节)
        localWindow.setAttributes(localLayoutParams);
原创粉丝点击