Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何创建类似应用程序的夜间模式_Android_Eclipse - Fatal编程技术网

Android 如何创建类似应用程序的夜间模式

Android 如何创建类似应用程序的夜间模式,android,eclipse,Android,Eclipse,如何制作会使屏幕灯光变暗的应用程序 我想做一个简单的应用程序,这是做屏幕亮度非常低 通过编程降低屏幕亮度 Settings.System .putInt(this.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, newBrightnessValue); 使用这种方法。在“newBrightnessValue”处传递int值。您还可以分别通过0或1获得低亮度和高亮

如何制作会使屏幕灯光变暗的应用程序

我想做一个简单的应用程序,这是做屏幕亮度非常低

通过编程降低屏幕亮度

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

使用这种方法。在“newBrightnessValue”处传递int值。您还可以分别通过0或1获得低亮度和高亮度

屏幕设计基于应用程序主题。默认情况下,我们在清单文件中指定应用程序主题。它在我们的应用程序中使用主题

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

您还可以在
styles.xml
文件中定义自己的主题
setTheme(android.R.style.Theme_Dark);