WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = 1F;
getWindow().setAttributes(layout);
I added this code to button onClick and it worked ! But is there a higher value since the screen didn't light MAX ??
As stated in the documentation, no. Setting screenBrightness
to 1 should adjust the brightness to full light.