-1

How can make app which will dim screen light.

I want to make simple application which is do screen brightness very low

Dim screen brightness by programatically

  • https://stackoverflow.com/questions/6708692/changing-the-screen-brightness-system-setting-android – NitZRobotKoder Jun 15 '17 at 09:34
  • https://stackoverflow.com/questions/39251596/screen-brightness-mode-does-not-work-with-permission – NitZRobotKoder Jun 15 '17 at 09:34
  • Possible duplicate of [Changing the Screen Brightness System Setting Android](https://stackoverflow.com/questions/6708692/changing-the-screen-brightness-system-setting-android) – 2Dee Jun 15 '17 at 10:42

2 Answers2

1
  Settings.System
            .putInt(this.getContentResolver(),
                    Settings.System.SCREEN_BRIGHTNESS, newBrightnessValue);

Use This method. Pass int value at "newBrightnessValue". you can also pass 0 or 1 for low & high brightness respectivily

Mr Code
  • 124
  • 10
0

The screen design is presented based on Application Theme. By default, we specify the application theme in manifest file. It uses the theme in our application

<application
        android:name=".MainApplication"
        android:allowBackup="true"
        android:theme="@style/AppTheme">

You can change Dark theme during run time

setTheme(android.R.style.Theme_Dark);

enter image description here

Also you can define your own theme in styles.xml file

Community
  • 1
  • 1