aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/values/arrays.xml18
-rw-r--r--app/src/main/res/values/strings.xml16
-rw-r--r--app/src/main/res/xml/customize_main_page_tabs_preferences.xml76
-rw-r--r--app/src/main/res/xml/interface_preference.xml5
4 files changed, 114 insertions, 1 deletions
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index b415b0f5..5fce9e21 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -122,4 +122,22 @@
<item>XLarge</item>
<item>XXLarge</item>
</string-array>
+
+ <string-array name="settings_tab_post_type">
+ <item>Home</item>
+ <item>Popular</item>
+ <item>All</item>
+ <item>Subreddit</item>
+ <item>MultiReddit</item>
+ <item>User</item>
+ </string-array>
+
+ <string-array name="settings_tab_post_type_values">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</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 52ec8509..5df67ecc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -321,6 +321,8 @@
<string name="settings_immersive_interface_title">Immersive Interface</string>
<string name="settings_immersive_interface_ignore_nav_bar_title">Ignore Navigation Bar in Immersive Interface</string>
<string name="settings_immersive_interface_ignore_nav_bar_summary">Prevent the Bottom Navigation Bar Having Extra Padding</string>
+ <string name="settings_customize_tabs_in_main_page_title">Customize Tabs in Main Page</string>
+ <string name="settings_customize_tabs_in_main_page_summary">Only for Logged-in User</string>
<string name="settings_enable_bottom_app_bar_title">Enable Bottom Navigation</string>
<string name="settings_enable_bottom_app_bar_summary">Has No Effect in Anonymous Mode</string>
<string name="settings_vote_buttons_on_the_right_title">Vote Buttons on the Right</string>
@@ -393,6 +395,15 @@
<string name="settings_delete_all_themes_in_database_title">Delete All Themes in Database</string>
<string name="settings_reset_all_settings_title">Reset All Settings</string>
<string name="settings_advanced_settings_summary">Clean the database and shared preferences</string>
+ <string name="settings_tab_info">Restart the app to see the changes</string>
+ <string name="settings_tab_1_summary">Tab 1</string>
+ <string name="settings_tab_2_summary">Tab 2</string>
+ <string name="settings_tab_3_summary">Tab 3</string>
+ <string name="settings_tab_title">Title</string>
+ <string name="settings_tab_post_type">Type</string>
+ <string name="settings_tab_subreddit_name">Subreddit Name</string>
+ <string name="settings_tab_multi_reddit_name">MultiReddit Name</string>
+ <string name="settings_tab_username">Username</string>
<string name="no_link_available">Cannot get the link</string>
@@ -711,10 +722,13 @@
<string name="report_successful">Reported</string>
<string name="report_failed">Report failed</string>
<string name="report_reason_not_selected">You haven\'t selected a reason</string>
-
+
<string name="report_reason_general_spam">It Is Spam</string>
<string name="report_reason_general_copyright_issue">It Contains Copyright Issue</string>
<string name="report_reason_general_child_pornography">It Contains Child Pornography</string>
<string name="report_reason_general_abusive_content">It Contains Abusive Content</string>
+ <string name="home">Home</string>
+ <string name="popular">Best</string>
+
</resources>
diff --git a/app/src/main/res/xml/customize_main_page_tabs_preferences.xml b/app/src/main/res/xml/customize_main_page_tabs_preferences.xml
new file mode 100644
index 00000000..37e17d0c
--- /dev/null
+++ b/app/src/main/res/xml/customize_main_page_tabs_preferences.xml
@@ -0,0 +1,76 @@
+<?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">
+
+ <Preference
+ android:icon="@drawable/ic_info_preference_24dp"
+ app:summary="@string/settings_tab_info"
+ app:enabled="false" />
+
+ <PreferenceCategory
+ app:title="@string/settings_tab_1_summary" />
+
+ <EditTextPreference
+ app:defaultValue="@string/home"
+ app:key="main_page_tab_1_title"
+ app:title="@string/settings_tab_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="0"
+ android:entries="@array/settings_tab_post_type"
+ app:entryValues="@array/settings_tab_post_type_values"
+ app:key="main_page_tab_1_post_type"
+ app:title="@string/settings_tab_post_type"
+ app:useSimpleSummaryProvider="true" />
+
+ <EditTextPreference
+ app:key="main_page_tab_1_name"
+ app:isPreferenceVisible="false"
+ app:useSimpleSummaryProvider="true" />
+
+ <PreferenceCategory
+ app:title="@string/settings_tab_2_summary" />
+
+ <EditTextPreference
+ app:defaultValue="@string/popular"
+ app:key="main_page_tab_2_title"
+ app:title="@string/settings_tab_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="1"
+ android:entries="@array/settings_tab_post_type"
+ app:entryValues="@array/settings_tab_post_type_values"
+ app:key="main_page_tab_2_post_type"
+ app:title="@string/settings_tab_post_type"
+ app:useSimpleSummaryProvider="true" />
+
+ <EditTextPreference
+ app:key="main_page_tab_2_name"
+ app:isPreferenceVisible="false"
+ app:useSimpleSummaryProvider="true" />
+
+ <PreferenceCategory
+ app:title="@string/settings_tab_3_summary" />
+
+ <EditTextPreference
+ app:defaultValue="@string/all"
+ app:key="main_page_tab_3_title"
+ app:title="@string/settings_tab_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="2"
+ android:entries="@array/settings_tab_post_type"
+ app:entryValues="@array/settings_tab_post_type_values"
+ app:key="main_page_tab_3_post_type"
+ app:title="@string/settings_tab_post_type"
+ app:useSimpleSummaryProvider="true" />
+
+ <EditTextPreference
+ app:key="main_page_tab_3_name"
+ app:isPreferenceVisible="false"
+ app:useSimpleSummaryProvider="true" />
+
+</PreferenceScreen> \ No newline at end of file
diff --git a/app/src/main/res/xml/interface_preference.xml b/app/src/main/res/xml/interface_preference.xml
index 8b67a3bc..58de9ef4 100644
--- a/app/src/main/res/xml/interface_preference.xml
+++ b/app/src/main/res/xml/interface_preference.xml
@@ -20,6 +20,11 @@
app:summary="@string/settings_immersive_interface_ignore_nav_bar_summary"
app:isPreferenceVisible="false" />
+ <Preference
+ app:title="@string/settings_customize_tabs_in_main_page_title"
+ app:summary="@string/settings_customize_tabs_in_main_page_summary"
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.CustomizeMainPageTabsFragment" />
+
<SwitchPreference
app:defaultValue="false"
app:key="bottom_app_bar"