'Change the speed of brightness being set
Currently I am using the following method to change the brightness
WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes();
float brightness = 1.0f;
lp.screenBrightness = brightness;
getActivity().getWindow().setAttributes(lp);
This changes the brightness of the activity from the current brightness to full brightness. This happens gradually, Is it possible to change the speed of the brightness being set? I want to increase the speed of brightness being set.
Solution 1:[1]
AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
MainActivity.java
int progress = 100;
Settings.System.putInt(this,Settings.System.SCREEN_BRIGHTNESS, progress);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Meet Bhavsar |
