aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-10-19 10:03:49 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-10-19 10:03:49 +0000
commit966f41f3b67c6ac5df1d31be08e8712932053e9c (patch)
treeb7c97ff635f5b2371d1dd547ee36fa4fdbb84f28 /app/src/main/res
parent1283ad62bb01ecabf03862b0a757b9448ac8c20c (diff)
downloadinfinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.tar
infinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.tar.gz
infinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.tar.bz2
infinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.tar.lz
infinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.tar.xz
infinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.tar.zst
infinity-for-reddit-966f41f3b67c6ac5df1d31be08e8712932053e9c.zip
Add Miscellaneous settings. Rearange settings. Add an option: Respect Subreddit Recommended Comment Sort Type.
Diffstat (limited to '')
-rw-r--r--app/src/main/res/drawable-night/ic_miscellaneous_24dp.xml12
-rw-r--r--app/src/main/res/drawable/ic_miscellaneous_24dp.xml12
-rw-r--r--app/src/main/res/values/strings.xml3
-rw-r--r--app/src/main/res/xml/main_preferences.xml23
-rw-r--r--app/src/main/res/xml/miscellaneous_preferences.xml28
5 files changed, 60 insertions, 18 deletions
diff --git a/app/src/main/res/drawable-night/ic_miscellaneous_24dp.xml b/app/src/main/res/drawable-night/ic_miscellaneous_24dp.xml
new file mode 100644
index 00000000..52a52180
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_miscellaneous_24dp.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M14.17,13.71l1.4,-2.42c0.09,-0.15 0.05,-0.34 -0.08,-0.45l-1.48,-1.16c0.03,-0.22 0.05,-0.45 0.05,-0.68s-0.02,-0.46 -0.05,-0.69l1.48,-1.16c0.13,-0.11 0.17,-0.3 0.08,-0.45l-1.4,-2.42c-0.09,-0.15 -0.27,-0.21 -0.43,-0.15L12,4.83c-0.36,-0.28 -0.75,-0.51 -1.18,-0.69l-0.26,-1.85C10.53,2.13 10.38,2 10.21,2h-2.8C7.24,2 7.09,2.13 7.06,2.3L6.8,4.15C6.38,4.33 5.98,4.56 5.62,4.84l-1.74,-0.7c-0.16,-0.06 -0.34,0 -0.43,0.15l-1.4,2.42C1.96,6.86 2,7.05 2.13,7.16l1.48,1.16C3.58,8.54 3.56,8.77 3.56,9s0.02,0.46 0.05,0.69l-1.48,1.16C2,10.96 1.96,11.15 2.05,11.3l1.4,2.42c0.09,0.15 0.27,0.21 0.43,0.15l1.74,-0.7c0.36,0.28 0.75,0.51 1.18,0.69l0.26,1.85C7.09,15.87 7.24,16 7.41,16h2.8c0.17,0 0.32,-0.13 0.35,-0.3l0.26,-1.85c0.42,-0.18 0.82,-0.41 1.18,-0.69l1.74,0.7C13.9,13.92 14.08,13.86 14.17,13.71zM8.81,11c-1.1,0 -2,-0.9 -2,-2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2C10.81,10.1 9.91,11 8.81,11z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M21.92,18.67l-0.96,-0.74c0.02,-0.14 0.04,-0.29 0.04,-0.44c0,-0.15 -0.01,-0.3 -0.04,-0.44l0.95,-0.74c0.08,-0.07 0.11,-0.19 0.05,-0.29l-0.9,-1.55c-0.05,-0.1 -0.17,-0.13 -0.28,-0.1l-1.11,0.45c-0.23,-0.18 -0.48,-0.33 -0.76,-0.44l-0.17,-1.18C18.73,13.08 18.63,13 18.53,13h-1.79c-0.11,0 -0.21,0.08 -0.22,0.19l-0.17,1.18c-0.27,0.12 -0.53,0.26 -0.76,0.44l-1.11,-0.45c-0.1,-0.04 -0.22,0 -0.28,0.1l-0.9,1.55c-0.05,0.1 -0.04,0.22 0.05,0.29l0.95,0.74c-0.02,0.14 -0.03,0.29 -0.03,0.44c0,0.15 0.01,0.3 0.03,0.44l-0.95,0.74c-0.08,0.07 -0.11,0.19 -0.05,0.29l0.9,1.55c0.05,0.1 0.17,0.13 0.28,0.1l1.11,-0.45c0.23,0.18 0.48,0.33 0.76,0.44l0.17,1.18c0.02,0.11 0.11,0.19 0.22,0.19h1.79c0.11,0 0.21,-0.08 0.22,-0.19l0.17,-1.18c0.27,-0.12 0.53,-0.26 0.75,-0.44l1.12,0.45c0.1,0.04 0.22,0 0.28,-0.1l0.9,-1.55C22.03,18.86 22,18.74 21.92,18.67zM17.63,18.83c-0.74,0 -1.35,-0.6 -1.35,-1.35s0.6,-1.35 1.35,-1.35s1.35,0.6 1.35,1.35S18.37,18.83 17.63,18.83z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_miscellaneous_24dp.xml b/app/src/main/res/drawable/ic_miscellaneous_24dp.xml
new file mode 100644
index 00000000..788d988e
--- /dev/null
+++ b/app/src/main/res/drawable/ic_miscellaneous_24dp.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M14.17,13.71l1.4,-2.42c0.09,-0.15 0.05,-0.34 -0.08,-0.45l-1.48,-1.16c0.03,-0.22 0.05,-0.45 0.05,-0.68s-0.02,-0.46 -0.05,-0.69l1.48,-1.16c0.13,-0.11 0.17,-0.3 0.08,-0.45l-1.4,-2.42c-0.09,-0.15 -0.27,-0.21 -0.43,-0.15L12,4.83c-0.36,-0.28 -0.75,-0.51 -1.18,-0.69l-0.26,-1.85C10.53,2.13 10.38,2 10.21,2h-2.8C7.24,2 7.09,2.13 7.06,2.3L6.8,4.15C6.38,4.33 5.98,4.56 5.62,4.84l-1.74,-0.7c-0.16,-0.06 -0.34,0 -0.43,0.15l-1.4,2.42C1.96,6.86 2,7.05 2.13,7.16l1.48,1.16C3.58,8.54 3.56,8.77 3.56,9s0.02,0.46 0.05,0.69l-1.48,1.16C2,10.96 1.96,11.15 2.05,11.3l1.4,2.42c0.09,0.15 0.27,0.21 0.43,0.15l1.74,-0.7c0.36,0.28 0.75,0.51 1.18,0.69l0.26,1.85C7.09,15.87 7.24,16 7.41,16h2.8c0.17,0 0.32,-0.13 0.35,-0.3l0.26,-1.85c0.42,-0.18 0.82,-0.41 1.18,-0.69l1.74,0.7C13.9,13.92 14.08,13.86 14.17,13.71zM8.81,11c-1.1,0 -2,-0.9 -2,-2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2C10.81,10.1 9.91,11 8.81,11z"
+ android:fillColor="#000000"/>
+ <path
+ android:pathData="M21.92,18.67l-0.96,-0.74c0.02,-0.14 0.04,-0.29 0.04,-0.44c0,-0.15 -0.01,-0.3 -0.04,-0.44l0.95,-0.74c0.08,-0.07 0.11,-0.19 0.05,-0.29l-0.9,-1.55c-0.05,-0.1 -0.17,-0.13 -0.28,-0.1l-1.11,0.45c-0.23,-0.18 -0.48,-0.33 -0.76,-0.44l-0.17,-1.18C18.73,13.08 18.63,13 18.53,13h-1.79c-0.11,0 -0.21,0.08 -0.22,0.19l-0.17,1.18c-0.27,0.12 -0.53,0.26 -0.76,0.44l-1.11,-0.45c-0.1,-0.04 -0.22,0 -0.28,0.1l-0.9,1.55c-0.05,0.1 -0.04,0.22 0.05,0.29l0.95,0.74c-0.02,0.14 -0.03,0.29 -0.03,0.44c0,0.15 0.01,0.3 0.03,0.44l-0.95,0.74c-0.08,0.07 -0.11,0.19 -0.05,0.29l0.9,1.55c0.05,0.1 0.17,0.13 0.28,0.1l1.11,-0.45c0.23,0.18 0.48,0.33 0.76,0.44l0.17,1.18c0.02,0.11 0.11,0.19 0.22,0.19h1.79c0.11,0 0.21,-0.08 0.22,-0.19l0.17,-1.18c0.27,-0.12 0.53,-0.26 0.75,-0.44l1.12,0.45c0.1,0.04 0.22,0 0.28,-0.1l0.9,-1.55C22.03,18.86 22,18.74 21.92,18.67zM17.63,18.83c-0.74,0 -1.35,-0.6 -1.35,-1.35s0.6,-1.35 1.35,-1.35s1.35,0.6 1.35,1.35S18.37,18.83 17.63,18.83z"
+ android:fillColor="#000000"/>
+</vector>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a0b51351..0375432b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -494,6 +494,9 @@
<string name="settings_translation_summary">Translate this app on POEditor. Thanks to all contributors.</string>
<string name="settings_credits_national_flags">National Flags</string>
<string name="settings_credits_national_flags_summary">Icon made by Freepik from www.flaticon.com</string>
+ <string name="settings_miscellaneous_title">Miscellaneous</string>
+ <string name="settings_respect_subreddit_recommended_comment_sort_type_title">Respect Subreddit Recommended Comment Sort Type</string>
+ <string name="settings_respect_subreddit_recommended_comment_sort_type_summary">Comment sort type will not be saved</string>
<string name="no_link_available">Cannot get the link</string>
diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml
index 88756af0..8ada3e6c 100644
--- a/app/src/main/res/xml/main_preferences.xml
+++ b/app/src/main/res/xml/main_preferences.xml
@@ -53,30 +53,17 @@
app:icon="@drawable/ic_data_saving_mode_black_24dp"
app:fragment="ml.docilealligator.infinityforreddit.Settings.DataSavingModePreferenceFragment" />
- <SwitchPreference
- app:defaultValue="false"
- app:key="save_front_page_scrolled_position"
- app:title="@string/settings_save_front_page_scrolled_position_title"
- app:summary="@string/settings_save_front_page_scrolled_position_summary" />
-
- <SwitchPreference
- app:defaultValue="false"
- app:icon="@drawable/ic_link"
- app:key="open_link_in_app"
- app:title="@string/settings_open_link_in_app_title" />
-
- <SwitchPreference
- app:defaultValue="false"
- app:key="confirm_to_exit"
- app:icon="@drawable/ic_exit_24dp"
- app:title="@string/settings_confirm_to_exit" />
-
<Preference
app:icon="@drawable/ic_nsfw_on_24dp"
app:title="@string/settings_nsfw_and_spoiler_title"
app:fragment="ml.docilealligator.infinityforreddit.Settings.NsfwAndBlurringFragment"/>
<Preference
+ app:icon="@drawable/ic_miscellaneous_24dp"
+ app:title="@string/settings_miscellaneous_title"
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.MiscellaneousPreferenceFragment"/>
+
+ <Preference
app:title="@string/settings_advanced_master_title"
app:fragment="ml.docilealligator.infinityforreddit.Settings.AdvancedPreferenceFragment" />
diff --git a/app/src/main/res/xml/miscellaneous_preferences.xml b/app/src/main/res/xml/miscellaneous_preferences.xml
new file mode 100644
index 00000000..f4274a5a
--- /dev/null
+++ b/app/src/main/res/xml/miscellaneous_preferences.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <SwitchPreference
+ app:defaultValue="false"
+ app:key="save_front_page_scrolled_position"
+ app:title="@string/settings_save_front_page_scrolled_position_title"
+ app:summary="@string/settings_save_front_page_scrolled_position_summary" />
+
+ <SwitchPreference
+ app:defaultValue="false"
+ app:icon="@drawable/ic_link"
+ app:key="open_link_in_app"
+ app:title="@string/settings_open_link_in_app_title" />
+
+ <SwitchPreference
+ app:defaultValue="false"
+ app:key="confirm_to_exit"
+ app:icon="@drawable/ic_exit_24dp"
+ 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" />
+
+</PreferenceScreen> \ No newline at end of file