aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-02-20 04:27:51 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-02-20 04:27:51 +0000
commit59465390a9e5ec06bfd8d3b46fbcaeedf560f563 (patch)
treec351ccfef0a4839487b3ee1c151b2588bf6232ad /app/src/main/res
parent97993709e2a2c286583df1cba445a351a7b9d676 (diff)
downloadinfinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.tar
infinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.tar.gz
infinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.tar.bz2
infinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.tar.lz
infinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.tar.xz
infinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.tar.zst
infinity-for-reddit-59465390a9e5ec06bfd8d3b46fbcaeedf560f563.zip
Add a nsfw toggle in the nav drawer.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable-night/ic_nsfw_off_24dp.xml9
-rw-r--r--app/src/main/res/drawable-night/ic_nsfw_on_24dp.xml9
-rw-r--r--app/src/main/res/drawable-night/ic_outline_access_time_24dp.xml (renamed from app/src/main/res/drawable-night/ic_outline_access_time_24px.xml)0
-rw-r--r--app/src/main/res/drawable/ic_nsfw_off_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_nsfw_on_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_outline_access_time_24dp.xml (renamed from app/src/main/res/drawable/ic_outline_access_time_24px.xml)0
-rw-r--r--app/src/main/res/values/strings.xml3
-rw-r--r--app/src/main/res/xml/main_preferences.xml3
-rw-r--r--app/src/main/res/xml/notification_preferences.xml2
9 files changed, 42 insertions, 2 deletions
diff --git a/app/src/main/res/drawable-night/ic_nsfw_off_24dp.xml b/app/src/main/res/drawable-night/ic_nsfw_off_24dp.xml
new file mode 100644
index 00000000..9f331000
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_nsfw_off_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:fillColor="#FFFFFFFF"
+ android:pathData="M13,2V10H21A8,8 0,0 0,13 2M19.32,15.89C20.37,14.54 21,12.84 21,11H6.44L5.5,9H2V11H4.22C4.22,11 6.11,15.07 6.34,15.42C5.24,16 4.5,17.17 4.5,18.5A3.5,3.5 0,0 0,8 22C9.76,22 11.22,20.7 11.46,19H13.54C13.78,20.7 15.24,22 17,22A3.5,3.5 0,0 0,20.5 18.5C20.5,17.46 20.04,16.53 19.32,15.89M8,20A1.5,1.5 0,0 1,6.5 18.5A1.5,1.5 0,0 1,8 17A1.5,1.5 0,0 1,9.5 18.5A1.5,1.5 0,0 1,8 20M17,20A1.5,1.5 0,0 1,15.5 18.5A1.5,1.5 0,0 1,17 17A1.5,1.5 0,0 1,18.5 18.5A1.5,1.5 0,0 1,17 20Z"/>
+</vector>
diff --git a/app/src/main/res/drawable-night/ic_nsfw_on_24dp.xml b/app/src/main/res/drawable-night/ic_nsfw_on_24dp.xml
new file mode 100644
index 00000000..ccd0b005
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_nsfw_on_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:fillColor="#FFFFFFFF"
+ android:pathData="M22,10C22,5.6 18.4,2 14,2V10H22M14.2,11H22C22,12.8 21.4,14.5 20.3,15.9C21,16.5 21.4,17.4 21.5,18.3L14.2,11M20.8,22.7L22.1,21.4L2.4,1.7L1.1,3L9.1,11H7.4L6.5,9H3V11H5.2C5.2,11 7.1,15.1 7.3,15.4C6.3,15.9 5.6,16.9 5.5,18C5.2,19.9 6.6,21.7 8.5,22C10.4,22.3 12.2,20.9 12.5,19H14.6C14.7,19.4 14.8,19.8 15,20.2C15.9,21.9 18.1,22.5 19.7,21.6L20.8,22.7M10.5,18.5C10.5,19.3 9.8,20 9,20S7.5,19.3 7.5,18.5 8.2,17 9,17 10.5,17.7 10.5,18.5M18.1,20C17.2,20 16.5,19.3 16.5,18.5V18.4L18.1,20Z"/>
+</vector>
diff --git a/app/src/main/res/drawable-night/ic_outline_access_time_24px.xml b/app/src/main/res/drawable-night/ic_outline_access_time_24dp.xml
index a846b915..a846b915 100644
--- a/app/src/main/res/drawable-night/ic_outline_access_time_24px.xml
+++ b/app/src/main/res/drawable-night/ic_outline_access_time_24dp.xml
diff --git a/app/src/main/res/drawable/ic_nsfw_off_24dp.xml b/app/src/main/res/drawable/ic_nsfw_off_24dp.xml
new file mode 100644
index 00000000..5f69aef8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_nsfw_off_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:fillColor="#FF000000"
+ android:pathData="M13,2V10H21A8,8 0,0 0,13 2M19.32,15.89C20.37,14.54 21,12.84 21,11H6.44L5.5,9H2V11H4.22C4.22,11 6.11,15.07 6.34,15.42C5.24,16 4.5,17.17 4.5,18.5A3.5,3.5 0,0 0,8 22C9.76,22 11.22,20.7 11.46,19H13.54C13.78,20.7 15.24,22 17,22A3.5,3.5 0,0 0,20.5 18.5C20.5,17.46 20.04,16.53 19.32,15.89M8,20A1.5,1.5 0,0 1,6.5 18.5A1.5,1.5 0,0 1,8 17A1.5,1.5 0,0 1,9.5 18.5A1.5,1.5 0,0 1,8 20M17,20A1.5,1.5 0,0 1,15.5 18.5A1.5,1.5 0,0 1,17 17A1.5,1.5 0,0 1,18.5 18.5A1.5,1.5 0,0 1,17 20Z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_nsfw_on_24dp.xml b/app/src/main/res/drawable/ic_nsfw_on_24dp.xml
new file mode 100644
index 00000000..f03560c8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_nsfw_on_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:fillColor="#FF000000"
+ android:pathData="M22,10C22,5.6 18.4,2 14,2V10H22M14.2,11H22C22,12.8 21.4,14.5 20.3,15.9C21,16.5 21.4,17.4 21.5,18.3L14.2,11M20.8,22.7L22.1,21.4L2.4,1.7L1.1,3L9.1,11H7.4L6.5,9H3V11H5.2C5.2,11 7.1,15.1 7.3,15.4C6.3,15.9 5.6,16.9 5.5,18C5.2,19.9 6.6,21.7 8.5,22C10.4,22.3 12.2,20.9 12.5,19H14.6C14.7,19.4 14.8,19.8 15,20.2C15.9,21.9 18.1,22.5 19.7,21.6L20.8,22.7M10.5,18.5C10.5,19.3 9.8,20 9,20S7.5,19.3 7.5,18.5 8.2,17 9,17 10.5,17.7 10.5,18.5M18.1,20C17.2,20 16.5,19.3 16.5,18.5V18.4L18.1,20Z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_outline_access_time_24px.xml b/app/src/main/res/drawable/ic_outline_access_time_24dp.xml
index dcb0d6ec..dcb0d6ec 100644
--- a/app/src/main/res/drawable/ic_outline_access_time_24px.xml
+++ b/app/src/main/res/drawable/ic_outline_access_time_24dp.xml
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7224c2d2..17975d8a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -444,4 +444,7 @@
<string name="delete_multi_reddit_success">Delete successfully</string>
<string name="delete_multi_reddit_failed">Delete failed</string>
<string name="delete_multi_reddit_dialog_message">Are you sure?</string>
+
+ <string name="enable_nsfw">Enable NSFW</string>
+ <string name="disable_nsfw">Disable NSFW</string>
</resources>
diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml
index 89d0a032..550525ef 100644
--- a/app/src/main/res/xml/main_preferences.xml
+++ b/app/src/main/res/xml/main_preferences.xml
@@ -53,13 +53,14 @@
android:entries="@array/settings_lazy_mode_interval"
app:entryValues="@array/settings_lazy_mode_interval_values"
app:key="lazy_mode_interval"
- app:icon="@drawable/ic_outline_access_time_24px"
+ app:icon="@drawable/ic_outline_access_time_24dp"
app:title="@string/settings_lazy_mode_interval_title"
app:useSimpleSummaryProvider="true" />
<SwitchPreference
app:defaultValue="false"
app:key="nsfw"
+ app:icon="@drawable/ic_nsfw_on_24dp"
app:title="@string/settings_enable_nsfw_title" />
<SwitchPreference
diff --git a/app/src/main/res/xml/notification_preferences.xml b/app/src/main/res/xml/notification_preferences.xml
index 8ef76485..2b547479 100644
--- a/app/src/main/res/xml/notification_preferences.xml
+++ b/app/src/main/res/xml/notification_preferences.xml
@@ -13,7 +13,7 @@
app:entries="@array/settings_notification_interval"
app:entryValues="@array/settings_notification_interval_values"
app:key="notificaiton_interval"
- app:icon="@drawable/ic_outline_access_time_24px"
+ app:icon="@drawable/ic_outline_access_time_24dp"
app:title="@string/settings_notification_interval_title"
app:useSimpleSummaryProvider="true"
app:isPreferenceVisible="false" />