aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/res/values/arrays.xml48
-rw-r--r--app/src/main/res/values/strings.xml8
-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
5 files changed, 110 insertions, 7 deletions
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 79819832..52191982 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -349,4 +349,52 @@
<item>tr-rTR</item>
</string-array>
+ <string-array name="settings_subreddit_default_sort_type">
+ <item>Hot</item>
+ <item>New</item>
+ <item>Rising</item>
+ <item>Top</item>
+ <item>Controversial</item>
+ </string-array>
+
+ <string-array name="settings_subreddit_default_sort_type_values">
+ <item>HOT</item>
+ <item>NEW</item>
+ <item>RISING</item>
+ <item>TOP</item>
+ <item>CONTROVERSIAL</item>
+ </string-array>
+
+ <string-array name="settings_user_default_sort_type">
+ <item>New</item>
+ <item>Hot</item>
+ <item>Top</item>
+ <item>Controversial</item>
+ </string-array>
+
+ <string-array name="settings_user_default_sort_type_values">
+ <item>NEW</item>
+ <item>HOT</item>
+ <item>TOP</item>
+ <item>CONTROVERSIAL</item>
+ </string-array>
+
+ <string-array name="settings_default_sort_time">
+ <item>Hour</item>
+ <item>Day</item>
+ <item>Week</item>
+ <item>Month</item>
+ <item>Year</item>
+ <item>All Time</item>
+ </string-array>
+
+ <string-array name="settings_default_sort_time_values">
+ <item>HOUR</item>
+ <item>DAY</item>
+ <item>WEEK</item>
+ <item>MONTH</item>
+ <item>YEAR</item>
+ <item>ALL</item>
+ </string-array>
+
</resources> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f5410e92..50eab52f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -528,6 +528,12 @@
<string name="settings_mark_posts_as_read_after_voting_title">Mark Posts as Read After Voting</string>
<string name="settings_mark_posts_as_read_on_scroll_title">Mark Posts as Read on Scroll</string>
<string name="settings_hide_read_posts_automatically_title">Hide Read Posts Automatically</string>
+ <string name="settings_sort_type_title">Sort Type</string>
+ <string name="settings_save_sort_type_title">Save Sort Type</string>
+ <string name="settings_subreddit_default_sort_type_title">Subreddit Default Sort Type</string>
+ <string name="settings_subreddit_default_sort_time_title">Subreddit Default Sort Time</string>
+ <string name="settings_user_default_sort_type_title">User Default Sort Type</string>
+ <string name="settings_user_default_sort_time_title">User Default Sort Time</string>
<string name="no_link_available">Cannot get the link</string>
@@ -1010,5 +1016,7 @@
<string name="add_subreddit_or_user_to_multireddit_failed">Unable to add %1$s to multireddit %2$s</string>
<string name="choose_a_user">Choose a user</string>
+ <!-- TODO: Remove or change this placeholder text -->
+ <string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
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