实现Android 使用代码调节屏幕亮度,
实现自动跟随系统亮度。
1,实现效果:
2,实现代码
【1】XML文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android=""
xmlns: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"
android:layout_height="wrap_content"
android:text="自动调节亮度"/>
<SeekBar
android:id="@+id/seek"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/cb"
android:layout_below="@+id/tv"
android:layout_width="wrap_content"
and

发布评论