Added an option to reset all preferences and implemented a different popup for selecting preferences. Also fixed a context menu bug.

This commit is contained in:
ottoptj 2024-09-02 06:09:25 +03:00
commit be4dd79e89
11 changed files with 309 additions and 90 deletions

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
@ -7,44 +8,19 @@
app:key="defaultHome"
app:selectable="true"
app:title="Set Default Home" />
<PreferenceCategory
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:allowDividerAbove="false"
app:title="Customization">
<ListPreference
app:title="Customization" >
<Preference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:defaultValue="#00000000"
app:entries="@array/bg_options"
app:entryValues="@array/bg_values"
app:key="bgColor"
app:title="Background Color"
app:useSimpleSummaryProvider="true" />
<ListPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:defaultValue="#FFF3F3F3"
app:entries="@array/color_options"
app:entryValues="@array/color_values"
app:key="textColor"
app:title="Text Color"
app:useSimpleSummaryProvider="true" />
<SwitchPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:defaultValue="false"
android:title="Show Status Bar"
app:key="barVisibility" />
<ListPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:defaultValue="200"
app:entries="@array/animation_options"
app:entryValues="@array/animation_values"
app:key="animationSpeed"
app:title="Animation Speed"
app:useSimpleSummaryProvider="true" />
app:key="uiSettings"
app:selectable="true"
app:summary="Configure the overall look"
app:title="General UI" />
<Preference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -85,5 +61,17 @@
app:selectable="true"
app:title="About YAM Launcher" />
</PreferenceCategory>
<PreferenceCategory
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:allowDividerAbove="false"
app:title="Reset">
<Preference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:key="resetAll"
app:selectable="true"
app:title="Reset All Settings" />
</PreferenceCategory>
</PreferenceScreen>