Brightness Control
Brightness Control:
Android brightness control is the way and potential to change the brightness level of the Android device’s screen.
Something about the luminance measurement: the luminance is expressed in nits or cd/m² – candelas per square meter.
Example:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:padding="16dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<SeekBar
android:id="@+id/brightnessControl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progress="50"
android:max="100"
android:layout_marginTop="20dp"
android:layout_marginBottom="6dp"/>
<TextView
android:id="@+id/brightnessValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/brightnessControl"
android:layout_centerInParent="true"
android:text="0.5"
android:textSize="22sp"
android:textColor="#000000"
android:padding="16dp"
android:layout_marginTop="20dp"/>
</RelativeLayout>
</RelativeLayout>