Skip to content

Instantly share code, notes, and snippets.

@dmitriy-chernysh
Last active May 23, 2018 11:50
Show Gist options
  • Save dmitriy-chernysh/b096662e1ebffe6a955e149f4aed34f7 to your computer and use it in GitHub Desktop.
Save dmitriy-chernysh/b096662e1ebffe6a955e149f4aed34f7 to your computer and use it in GitHub Desktop.
Set full brightness for activity window
//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