aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/res/drawable/ic_data_saving_mode_black_24dp.xml9
-rw-r--r--app/src/main/res/values/arrays.xml12
-rw-r--r--app/src/main/res/values/strings.xml1
-rw-r--r--app/src/main/res/xml/data_saving_mode_preferences.xml13
-rw-r--r--app/src/main/res/xml/main_preferences.xml6
5 files changed, 41 insertions, 0 deletions
diff --git a/app/src/main/res/drawable/ic_data_saving_mode_black_24dp.xml b/app/src/main/res/drawable/ic_data_saving_mode_black_24dp.xml
new file mode 100644
index 00000000..89f69eca
--- /dev/null
+++ b/app/src/main/res/drawable/ic_data_saving_mode_black_24dp.xml
@@ -0,0 +1,9 @@
+<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="M11.8,10.9c-2.27,-0.59 -3,-1.2 -3,-2.15 0,-1.09 1.01,-1.85 2.7,-1.85 1.78,0 2.44,0.85 2.5,2.1h2.21c-0.07,-1.72 -1.12,-3.3 -3.21,-3.81V3h-3v2.16c-1.94,0.42 -3.5,1.68 -3.5,3.61 0,2.31 1.91,3.46 4.7,4.13 2.5,0.6 3,1.48 3,2.41 0,0.69 -0.49,1.79 -2.7,1.79 -2.06,0 -2.87,-0.92 -2.98,-2.1h-2.2c0.12,2.19 1.76,3.42 3.68,3.83V21h3v-2.15c1.95,-0.37 3.5,-1.5 3.5,-3.55 0,-2.84 -2.43,-3.81 -4.7,-4.4z"
+ android:fillColor="#000000"/>
+</vector>
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 41eedb8e..51f5f3ee 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -270,4 +270,16 @@
<item>0.8</item>
</string-array>
+ <string-array name="settings_data_saving_mode">
+ <item>Off</item>
+ <item>Only on Cellular Data</item>
+ <item>Always on</item>
+ </string-array>
+
+ <string-array name="settings_data_saving_mode_values">
+ <item>0</item>
+ <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 0e83c1d8..6d8d37cf 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -486,6 +486,7 @@
<string name="settings_bottom_app_bar_option_3">Option 3</string>
<string name="settings_bottom_app_bar_option_4">Option 4</string>
<string name="settings_bottom_app_bar_fab">Floating Action Button</string>
+ <string name="settings_data_saving_mode">Data Saving Mode</string>
<string name="no_link_available">Cannot get the link</string>
diff --git a/app/src/main/res/xml/data_saving_mode_preferences.xml b/app/src/main/res/xml/data_saving_mode_preferences.xml
new file mode 100644
index 00000000..1f66892f
--- /dev/null
+++ b/app/src/main/res/xml/data_saving_mode_preferences.xml
@@ -0,0 +1,13 @@
+<?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">
+
+ <ListPreference
+ app:defaultValue="0"
+ app:key="data_saving_mode"
+ android:title="@string/settings_data_saving_mode"
+ app:entries="@array/settings_data_saving_mode"
+ app:entryValues="@array/settings_data_saving_mode_values"
+ app:useSimpleSummaryProvider="true" />
+
+</PreferenceScreen> \ No newline at end of file
diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml
index 68c407ae..88756af0 100644
--- a/app/src/main/res/xml/main_preferences.xml
+++ b/app/src/main/res/xml/main_preferences.xml
@@ -47,6 +47,12 @@
android:icon="@drawable/ic_security_24dp"
app:fragment="ml.docilealligator.infinityforreddit.Settings.SecurityPreferenceFragment" />
+ <Preference
+ app:key="security"
+ app:title="@string/settings_data_saving_mode"
+ 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"