<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout 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=".SettingsActivity"> <TextView android:id="@+id/textEnd" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical|center_horizontal" android:text="End Time" android:textSize="20sp" app:layout_constraintBottom_toTopOf="@+id/timePicker" app:layout_constraintTop_toTopOf="parent" /> <TimePicker android:id="@+id/timePicker" android:layout_width="match_parent" android:layout_height="wrap_content" android:timePickerMode="clock" app:layout_constraintBottom_toTopOf="@+id/btnReset" app:layout_constraintTop_toBottomOf="@+id/textEnd" /> <Button android:id="@+id/btnReset" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Reset" android:textSize="30sp" app:layout_constraintBottom_toTopOf="@+id/lblPeriod" app:layout_constraintTop_toBottomOf="@+id/timePicker" /> <Button android:id="@+id/btnStart" android:layout_width="match_parent" android:layout_height="100dp" android:text="Start" android:textSize="40sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/cbDimScreen" /> <NumberPicker android:id="@+id/periodPicker" android:layout_width="wrap_content" android:layout_height="0dp" android:gravity="fill_horizontal" app:layout_constraintBottom_toTopOf="@+id/cbDimScreen" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toEndOf="@+id/lblPeriod" app:layout_constraintTop_toBottomOf="@+id/btnReset" /> <TextView android:id="@+id/lblPeriod" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical|center_horizontal" android:text="Update Period (seconds):" android:textSize="25sp" app:layout_constraintBottom_toTopOf="@+id/cbDimScreen" app:layout_constraintEnd_toStartOf="@+id/periodPicker" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/btnReset" /> <CheckBox android:id="@+id/cbDimScreen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right|center" android:layoutDirection="rtl" android:text="Dim Screen? " android:textColor="#ffC1C1C1" android:textSize="25sp" app:layout_constraintBottom_toTopOf="@+id/btnStart" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/lblPeriod" /> </androidx.constraintlayout.widget.ConstraintLayout>