Add option to disable screen timeout

Before it was disabled by default

Closes #54
This commit is contained in:
Finn M Glas 2020-06-26 07:29:48 +02:00
parent 08d4a6c2ef
commit 54662ad4ab
No known key found for this signature in database
GPG key ID: 902A30146014DFBF
4 changed files with 73 additions and 12 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<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"
@ -17,7 +17,12 @@
<ScrollView
android:id="@+id/settings_theme_scroller"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="0dp"
android:layout_marginBottom="32dp"
app:layout_constraintBottom_toTopOf="@id/settings_launcher_text_screen_timeout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
@ -134,4 +139,24 @@
</LinearLayout>
</ScrollView>
</LinearLayout>
<TextView
android:id="@+id/settings_launcher_text_screen_timeout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:text="Disable screen timeout"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Switch
android:id="@+id/settings_launcher_switch_screen_timeout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@id/settings_launcher_text_screen_timeout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/settings_launcher_text_screen_timeout" />
</androidx.constraintlayout.widget.ConstraintLayout>