实现Android 使用代码调节屏幕亮度,
实现自动跟随系统亮度。
1,实现效果:
2,实现代码
【1】XML文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:id="@+id/tv"
android:layout_below="@+id/seek"
android:layout_width="wrap_content"