activity_brightness.xml raw

   1  <?xml version="1.0" encoding="utf-8"?>
   2  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
   3      android:layout_width="match_parent"
   4      android:layout_height="match_parent">
   5  
   6      <TextView
   7          android:layout_width="match_parent"
   8          android:layout_height="match_parent"
   9          android:layout_above="@id/brightnessSwitch"
  10          android:background="@android:color/black"
  11          android:gravity="center"
  12          android:padding="?dialogPreferredPadding"
  13          android:text="@string/pref_ao_force_brightness_example"
  14          android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
  15          android:textColor="@color/white128" />
  16  
  17      <androidx.appcompat.widget.SwitchCompat
  18          android:id="@+id/brightnessSwitch"
  19          android:layout_width="match_parent"
  20          android:layout_height="wrap_content"
  21          android:layout_above="@id/seekBar"
  22          android:padding="?dialogPreferredPadding"
  23          android:text="@string/pref_ao_force_brightness" />
  24  
  25      <SeekBar
  26          android:id="@+id/seekBar"
  27          android:layout_width="match_parent"
  28          android:layout_height="wrap_content"
  29          android:layout_alignParentBottom="true"
  30          android:layout_marginStart="?dialogPreferredPadding"
  31          android:layout_marginTop="?dialogPreferredPadding"
  32          android:layout_marginEnd="?dialogPreferredPadding"
  33          android:layout_marginBottom="?dialogPreferredPadding"
  34          android:max="100"
  35          android:progress="50" />
  36  </RelativeLayout>