aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/xml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-08-25 01:34:50 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-08-25 01:34:50 +0000
commit087ca72fc75708184fa7154afb69e2907538c66e (patch)
treef2293702cce7b19f155f9d434ffda054e5cc5021 /app/src/main/res/xml
parent462208066adb90187e07194a995c732215b82581 (diff)
downloadinfinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.tar
infinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.tar.gz
infinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.tar.bz2
infinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.tar.lz
infinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.tar.xz
infinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.tar.zst
infinity-for-reddit-087ca72fc75708184fa7154afb69e2907538c66e.zip
Add options to change the number of columns in PostFragment portrait and landscape modes. Upgrade compileSdkVersion and targetSdkVersion to 30.
Diffstat (limited to 'app/src/main/res/xml')
-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
2 files changed, 28 insertions, 0 deletions
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