Last active
May 23, 2018 11:50
-
-
Save dmitriy-chernysh/b096662e1ebffe6a955e149f4aed34f7 to your computer and use it in GitHub Desktop.
Set full brightness for activity window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//set screen brightness to max | |
Window window = getActivity().getWindow(); | |
if (window != null) { | |
WindowManager.LayoutParams lp = window.getAttributes(); | |
lp.screenBrightness = 1; //from dark (0) to full bright (1) | |
window.setAttributes(lp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment