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.xml5
-rw-r--r--app/src/main/res/values/strings.xml3
-rw-r--r--app/src/main/res/xml-sw600dp/number_of_columns_in_post_feed_preferences.xml18
-rw-r--r--app/src/main/res/xml/interface_preference.xml4
-rw-r--r--app/src/main/res/xml/number_of_columns_in_post_feed_preferences.xml24
5 files changed, 54 insertions, 0 deletions
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index e3ad548e..38edbb2a 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -228,4 +228,9 @@
<item>yyyy.M.d HH:mm</item>
<item>yyyy.M.d hh:mm a</item>
</string-array>
+
+ <string-array name="settings_number_of_columns_in_post_feed">
+ <item>1</item>
+ <item>2</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 b909ab32..8105a92f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -387,6 +387,9 @@
<string name="settings_default_post_layout">Default Post Layout</string>
<string name="settings_show_divider_in_compact_layout">Show Divider in Compact Layout</string>
<string name="settings_show_thumbnail_on_the_left_in_compact_layout">Show Thumbnail on the Left in Compact Layout</string>
+ <string name="settings_number_of_columns_in_post_feed_title">The Number of Columns in Post Feed</string>
+ <string name="settings_number_of_columns_in_post_feed_portrait_title">Portrait</string>
+ <string name="settings_number_of_columns_in_post_feed_landscape_title">Landscape</string>
<string name="settings_swap_tap_and_long_title">Swap Tap and Long Press in Comments</string>
<string name="settings_swipe_to_go_back_title">Swipe Right to Go Back</string>
<string name="settings_swipe_to_go_back_summary">Does Not Apply to All Pages</string>
diff --git a/app/src/main/res/xml-sw600dp/number_of_columns_in_post_feed_preferences.xml b/app/src/main/res/xml-sw600dp/number_of_columns_in_post_feed_preferences.xml
new file mode 100644
index 00000000..4a61e4fc
--- /dev/null
+++ b/app/src/main/res/xml-sw600dp/number_of_columns_in_post_feed_preferences.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
+ <ListPreference
+ app:defaultValue="2"
+ app:entries="@array/settings_number_of_columns_in_post_feed"
+ app:entryValues="@array/settings_number_of_columns_in_post_feed"
+ app:key="number_of_columns_in_post_feed_portrait"
+ app:title="@string/settings_number_of_columns_in_post_feed_portrait_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="2"
+ app:entries="@array/settings_number_of_columns_in_post_feed"
+ app:entryValues="@array/settings_number_of_columns_in_post_feed"
+ app:key="number_of_columns_in_post_feed_landscape"
+ app:title="@string/settings_number_of_columns_in_post_feed_landscape_title"
+ 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 2e5c71e3..0fcd1977 100644
--- a/app/src/main/res/xml/interface_preference.xml
+++ b/app/src/main/res/xml/interface_preference.xml
@@ -62,6 +62,10 @@
app:key="show_thumbnail_on_the_left_in_compact_layout"
app:title="@string/settings_show_thumbnail_on_the_left_in_compact_layout" />
+ <Preference
+ app:title="@string/settings_number_of_columns_in_post_feed_title"
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.NumberOfColumnsInPostFeedPreferenceFragment" />
+
<PreferenceCategory
app:title="@string/settings_category_comment_title" />
diff --git a/app/src/main/res/xml/number_of_columns_in_post_feed_preferences.xml b/app/src/main/res/xml/number_of_columns_in_post_feed_preferences.xml
new file mode 100644
index 00000000..cbaea03e
--- /dev/null
+++ b/app/src/main/res/xml/number_of_columns_in_post_feed_preferences.xml
@@ -0,0 +1,24 @@
+<?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" />
+
+ <ListPreference
+ app:defaultValue="1"
+ app:entries="@array/settings_number_of_columns_in_post_feed"
+ app:entryValues="@array/settings_number_of_columns_in_post_feed"
+ app:key="number_of_columns_in_post_feed_portrait"
+ app:title="@string/settings_number_of_columns_in_post_feed_portrait_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <ListPreference
+ app:defaultValue="2"
+ app:entries="@array/settings_number_of_columns_in_post_feed"
+ app:entryValues="@array/settings_number_of_columns_in_post_feed"
+ app:key="number_of_columns_in_post_feed_landscape"
+ app:title="@string/settings_number_of_columns_in_post_feed_landscape_title"
+ app:useSimpleSummaryProvider="true" />
+</PreferenceScreen> \ No newline at end of file