你如何在Android中设置屏幕亮度?

Vai*_*ani 3 android screen-brightness

我想要一个使用SeekBar.

如何显示带有SeekBar调整屏幕亮度的自定义对话框?

Ron*_*nie 6

您可以使用此 API。这将改变您的窗口而不是整个系统的屏幕亮度。

        // Make the screen full bright for this activity.
        WindowManager.LayoutParams lp = getWindow().getAttributes();
        lp.screenBrightness = 1.0f;

        getWindow().setAttributes(lp);
Run Code Online (Sandbox Code Playgroud)