aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/xml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-01-19 15:04:51 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-01-19 15:04:51 +0000
commit569283ea93dba6816df092e702b97f6d5c956ebf (patch)
tree9da508188fa72dd1fa43bbf137a66080cb78e911 /app/src/main/res/xml
parentb0bf06e0c09763726c3225f7f08076cda552aaa5 (diff)
downloadinfinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.tar
infinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.tar.gz
infinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.tar.bz2
infinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.tar.lz
infinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.tar.xz
infinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.tar.zst
infinity-for-reddit-569283ea93dba6816df092e702b97f6d5c956ebf.zip
Setting default sort for subreddits and users is available.
Diffstat (limited to 'app/src/main/res/xml')
-rw-r--r--app/src/main/res/xml/main_preferences.xml7
-rw-r--r--app/src/main/res/xml/miscellaneous_preferences.xml6
-rw-r--r--app/src/main/res/xml/sort_type_preferences.xml48
3 files changed, 54 insertions, 7 deletions
diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml
index e2dac88d..82a4689e 100644
--- a/app/src/main/res/xml/main_preferences.xml
+++ b/app/src/main/res/xml/main_preferences.xml
@@ -68,9 +68,14 @@
app:title="@string/settings_post_filter_title" />
<Preference
+ app:icon="@drawable/ic_sort_24dp"
+ app:title="@string/settings_sort_type_title"
+ app:fragment="ml.docilealligator.infinityforreddit.settings.SortTypePreferenceFragment" />
+
+ <Preference
app:icon="@drawable/ic_miscellaneous_24dp"
app:title="@string/settings_miscellaneous_title"
- app:fragment="ml.docilealligator.infinityforreddit.settings.MiscellaneousPreferenceFragment"/>
+ app:fragment="ml.docilealligator.infinityforreddit.settings.MiscellaneousPreferenceFragment" />
<Preference
android:icon="@drawable/ic_advanced_24dp"
diff --git a/app/src/main/res/xml/miscellaneous_preferences.xml b/app/src/main/res/xml/miscellaneous_preferences.xml
index 6fb763f6..b17e7545 100644
--- a/app/src/main/res/xml/miscellaneous_preferences.xml
+++ b/app/src/main/res/xml/miscellaneous_preferences.xml
@@ -20,12 +20,6 @@
app:title="@string/settings_confirm_to_exit" />
<SwitchPreference
- app:defaultValue="false"
- app:key="respect_subreddit_recommended_comment_sort_type"
- app:title="@string/settings_respect_subreddit_recommended_comment_sort_type_title"
- app:summary="@string/settings_respect_subreddit_recommended_comment_sort_type_summary" />
-
- <SwitchPreference
app:defaultValue="true"
app:key="enable_search_history"
app:title="@string/settings_enable_search_history_title"
diff --git a/app/src/main/res/xml/sort_type_preferences.xml b/app/src/main/res/xml/sort_type_preferences.xml
new file mode 100644
index 00000000..88b2a5f0
--- /dev/null
+++ b/app/src/main/res/xml/sort_type_preferences.xml
@@ -0,0 +1,48 @@
+<?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">
+
+ <SwitchPreference
+ app:defaultValue="true"
+ app:key="save_sort_type"
+ app:title="@string/settings_save_sort_type_title" />
+
+ <ListPreference
+ app:defaultValue="HOT"
+ app:entries="@array/settings_subreddit_default_sort_type"
+ app:entryValues="@array/settings_subreddit_default_sort_type_values"
+ app:key="subreddit_default_sort_type"
+ app:title="@string/settings_subreddit_default_sort_type_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="ALL"
+ app:entries="@array/settings_default_sort_time"
+ app:entryValues="@array/settings_default_sort_time_values"
+ app:key="subreddit_default_sort_time"
+ app:title="@string/settings_subreddit_default_sort_time_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="NEW"
+ app:entries="@array/settings_user_default_sort_type"
+ app:entryValues="@array/settings_user_default_sort_type_values"
+ app:key="user_default_sort_type"
+ app:title="@string/settings_user_default_sort_type_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="ALL"
+ app:entries="@array/settings_default_sort_time"
+ app:entryValues="@array/settings_default_sort_time_values"
+ app:key="user_default_sort_time"
+ app:title="@string/settings_user_default_sort_time_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <SwitchPreference
+ app:defaultValue="false"
+ app:key="respect_subreddit_recommended_comment_sort_type"
+ app:title="@string/settings_respect_subreddit_recommended_comment_sort_type_title"
+ app:summary="@string/settings_respect_subreddit_recommended_comment_sort_type_summary" />
+
+</PreferenceScreen> \ No newline at end of file