feature: reworked date & time settings

This commit is contained in:
Josia Pietsch 2024-08-28 20:40:48 +02:00
parent 7ecab3d9ae
commit e86ed34fe5
Signed by: jrpie
GPG key ID: E70B571D66986A2D
9 changed files with 214 additions and 144 deletions

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -44,33 +42,11 @@
android:text="@string/settings_launcher_section_appearance"
android:textColor="#ccc"
android:textSize="18sp"
android:layout_marginBottom="16sp"
tools:layout_editor_absoluteX="32dp"
tools:layout_editor_absoluteY="16dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16sp"
android:layout_marginBottom="16sp"
android:orientation="horizontal"
android:paddingLeft="8sp">
<TextView
android:id="@+id/settings_launcher_text_time_format"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_launcher_time_format"
android:textSize="16sp" />
<Spinner
android:id="@+id/settings_launcher_format_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:entries="@array/settings_launcher_time_format_spinner_items"
android:spinnerMode="dropdown" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -108,10 +84,133 @@
android:textAllCaps="false" />
</LinearLayout>
<LinearLayout
android:id="@+id/settings_launcher_section_date_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:orientation="horizontal">
<TextView
android:id="@+id/settings_launcher_section_date_time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_launcher_section_date_time"
android:textColor="#ccc"
android:textSize="18sp"
tools:layout_editor_absoluteX="32dp"
tools:layout_editor_absoluteY="16dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:gravity="top"
android:orientation="horizontal"
android:paddingLeft="8sp">
<TextView
android:id="@+id/settings_launcher_text_date_localized"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_launcher_date_localized"
android:textSize="16sp" />
<Switch
android:id="@+id/settings_launcher_switch_date_localized"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:gravity="top"
android:orientation="horizontal"
android:paddingLeft="8sp">
<TextView
android:id="@+id/settings_launcher_text_switch_date_visible"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_launcher_show_date"
android:textSize="16sp" />
<Switch
android:id="@+id/settings_launcher_switch_date_visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:gravity="top"
android:orientation="horizontal"
android:paddingLeft="8sp">
<TextView
android:id="@+id/settings_launcher_text_switch_time_visible"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_launcher_show_time"
android:textSize="16sp" />
<Switch
android:id="@+id/settings_launcher_switch_time_visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:gravity="top"
android:orientation="horizontal"
android:paddingLeft="8sp">
<TextView
android:id="@+id/settings_launcher_text_switch_date_time_flip"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_launcher_date_time_flip"
android:textSize="16sp" />
<Switch
android:id="@+id/settings_launcher_switch_date_time_flip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/settings_launcher_section_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:orientation="horizontal">
<TextView
@ -128,7 +227,6 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16sp"
android:layout_marginBottom="16sp"
android:gravity="top"
android:orientation="horizontal"
@ -182,6 +280,7 @@
android:id="@+id/settings_launcher_section_functions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16sp"
android:orientation="horizontal">
<TextView
@ -199,7 +298,6 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16sp"
android:layout_marginBottom="16sp"
android:gravity="top"
android:orientation="horizontal"
@ -301,4 +399,4 @@
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>