aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-03-02 14:38:53 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-03-02 14:38:53 +0000
commit980a1215731c20e840670d9ade77bc6bf64c255b (patch)
tree4cedd886d497820ad84aee92d7f2523573508389 /app/src/main/res
parent095dd30f710c71d1ee8f33403feca0861c139687 (diff)
downloadinfinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.tar
infinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.tar.gz
infinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.tar.bz2
infinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.tar.lz
infinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.tar.xz
infinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.tar.zst
infinity-for-reddit-980a1215731c20e840670d9ade77bc6bf64c255b.zip
Share image directly in ViewImageActivity.
Diffstat (limited to '')
-rw-r--r--app/src/main/res/drawable/ic_share_toolbar_white_24dp.xml9
-rw-r--r--app/src/main/res/menu/view_gif_activity.xml11
-rw-r--r--app/src/main/res/menu/view_image.xml10
-rw-r--r--app/src/main/res/menu/view_image_activity.xml17
-rw-r--r--app/src/main/res/menu/view_video.xml4
-rw-r--r--app/src/main/res/values/strings.xml5
-rw-r--r--app/src/main/res/xml/file_paths.xml3
7 files changed, 43 insertions, 16 deletions
diff --git a/app/src/main/res/drawable/ic_share_toolbar_white_24dp.xml b/app/src/main/res/drawable/ic_share_toolbar_white_24dp.xml
new file mode 100644
index 00000000..cbe3d4aa
--- /dev/null
+++ b/app/src/main/res/drawable/ic_share_toolbar_white_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="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92s2.92,-1.31 2.92,-2.92c0,-1.61 -1.31,-2.92 -2.92,-2.92zM18,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM6,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,20.02c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1z"/>
+</vector>
diff --git a/app/src/main/res/menu/view_gif_activity.xml b/app/src/main/res/menu/view_gif_activity.xml
index f97218ce..0dc5aba5 100644
--- a/app/src/main/res/menu/view_gif_activity.xml
+++ b/app/src/main/res/menu/view_gif_activity.xml
@@ -2,9 +2,16 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
- android:id="@+id/action_download_view_gif"
+ android:id="@+id/action_download_view_gif_activity"
android:orderInCategory="1"
android:title="@string/action_download"
android:icon="@drawable/ic_file_download_toolbar_white_24dp"
- app:showAsAction="always" />
+ app:showAsAction="ifRoom" />
+
+ <item
+ android:id="@+id/action_share_view_gif_activity"
+ android:orderInCategory="2"
+ android:title="@string/action_share"
+ android:icon="@drawable/ic_share_toolbar_white_24dp"
+ app:showAsAction="ifRoom" />
</menu> \ No newline at end of file
diff --git a/app/src/main/res/menu/view_image.xml b/app/src/main/res/menu/view_image.xml
deleted file mode 100644
index c09ff1f8..00000000
--- a/app/src/main/res/menu/view_image.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto">
- <item
- android:id="@+id/action_download_view_image"
- android:orderInCategory="1"
- android:title="@string/action_download"
- android:icon="@drawable/ic_file_download_toolbar_white_24dp"
- app:showAsAction="always" />
-</menu> \ No newline at end of file
diff --git a/app/src/main/res/menu/view_image_activity.xml b/app/src/main/res/menu/view_image_activity.xml
new file mode 100644
index 00000000..1f86092b
--- /dev/null
+++ b/app/src/main/res/menu/view_image_activity.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <item
+ android:id="@+id/action_download_view_image_activity"
+ android:orderInCategory="1"
+ android:title="@string/action_download"
+ android:icon="@drawable/ic_file_download_toolbar_white_24dp"
+ app:showAsAction="ifRoom" />
+
+ <item
+ android:id="@+id/action_share_view_image_activity"
+ android:orderInCategory="2"
+ android:title="@string/action_share"
+ android:icon="@drawable/ic_share_toolbar_white_24dp"
+ app:showAsAction="ifRoom" />
+</menu> \ No newline at end of file
diff --git a/app/src/main/res/menu/view_video.xml b/app/src/main/res/menu/view_video.xml
index 71a52c58..fa54098f 100644
--- a/app/src/main/res/menu/view_video.xml
+++ b/app/src/main/res/menu/view_video.xml
@@ -2,9 +2,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
- android:id="@+id/action_download_view_video"
+ android:id="@+id/action_download_view_video_activity"
android:orderInCategory="1"
android:title="@string/action_download"
android:icon="@drawable/ic_file_download_toolbar_white_24dp"
- app:showAsAction="always" />
+ app:showAsAction="ifRoom" />
</menu> \ 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 ccb251e4..cc7e8795 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -48,6 +48,7 @@
<string name="action_view_side_bar">View Sidebar</string>
<string name="action_save">Save</string>
<string name="action_delete_multi_reddit">Delete Multireddit</string>
+ <string name="action_share">Share</string>
<string name="parse_json_response_error">Error occurred when parsing the JSON response</string>
<string name="retrieve_token_error">Error Retrieving the token</string>
@@ -451,4 +452,8 @@
<string name="enable_nsfw">Enable NSFW</string>
<string name="disable_nsfw">Disable NSFW</string>
+
+ <string name="cannot_save_image">Cannot save the image</string>
+ <string name="cannot_save_gif">Cannot save the gif</string>
+ <string name="cannot_get_storage">Cannot access the app storage</string>
</resources>
diff --git a/app/src/main/res/xml/file_paths.xml b/app/src/main/res/xml/file_paths.xml
index 79f4cf3f..25648473 100644
--- a/app/src/main/res/xml/file_paths.xml
+++ b/app/src/main/res/xml/file_paths.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
- <external-path name="image_temp"
- path="Android/data/ml.docilealligator.infinityforreddit/files/Pictures" />
+ <external-path name="external_app_storage" path="." />
</paths> \ No newline at end of file