[Android] Import new app shortcut icon

Nicolas Pomepuy git at videolan.org
Mon Apr 4 13:56:43 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Apr  4 15:45:35 2022 +0200| [ca2c9a63e23b9d7f33fb605027a35e9f68dff6fd] | committer: Duncan McNamara

Import new app shortcut icon

> https://code.videolan.org/videolan/vlc-android/commit/ca2c9a63e23b9d7f33fb605027a35e9f68dff6fd
---

 .../resources/src/main/res/drawable/ic_ctx_app_shortcut.xml | 13 +++++++++++++
 .../src/org/videolan/vlc/gui/dialogs/ContextSheet.kt        |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/application/resources/src/main/res/drawable/ic_ctx_app_shortcut.xml b/application/resources/src/main/res/drawable/ic_ctx_app_shortcut.xml
new file mode 100644
index 000000000..4b47895c3
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_ctx_app_shortcut.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="40dp"
+    android:height="40dp"
+    android:viewportWidth="40"
+    android:viewportHeight="40">
+  <path
+      android:pathData="M13,4C11.338,4 10,5.338 10,7L10,33C10,34.662 11.338,36 13,36L27,36C28.662,36 30,34.662 30,33L30,26L27,26L27,28L13,28L13,12L27,12L27,14L30,14L30,7C30,5.338 28.662,4 27,4L13,4zM13,7L27,7L27,9L13,9L13,7zM33,13L32.2715,14.7715L30.5,15.5L32.2715,16.2285L33,18L33.7285,16.2285L35.5,15.5L33.7285,14.7715L33,13zM25,15L23.5,18.5L20,20L23.5,21.5L25,25L26.5,21.5L30,20L26.5,18.5L25,15zM33,22L32.2715,23.7715L30.5,24.5L32.2715,25.2285L33,27L33.7285,25.2285L35.5,24.5L33.7285,23.7715L33,22zM13,31L27,31L27,33L13,33L13,31z"
+      android:strokeLineJoin="round"
+      android:strokeWidth="2"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"
+      android:strokeLineCap="round"/>
+</vector>
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
index 724f57be5..2681b7389 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
@@ -108,7 +108,7 @@ class ContextSheet : VLCBottomSheetDialogFragment() {
         if (flags and CTX_COPY != 0L) add(Simple(CTX_COPY, getString(R.string.copy_to_clipboard), R.drawable.ic_ctx_link))
         if (flags and CTX_DELETE != 0L) add(Simple(CTX_DELETE, getString(R.string.delete), R.drawable.ic_ctx_delete))
         if (flags and CTX_SHARE != 0L) add(Simple(CTX_SHARE, getString(R.string.share), R.drawable.ic_ctx_share))
-        if (flags and CTX_ADD_SHORTCUT != 0L && ShortcutManagerCompat.isRequestPinShortcutSupported(requireActivity())) add(Simple(CTX_ADD_SHORTCUT, getString(R.string.create_shortcut), R.drawable.ic_ctx_folder))
+        if (flags and CTX_ADD_SHORTCUT != 0L && ShortcutManagerCompat.isRequestPinShortcutSupported(requireActivity())) add(Simple(CTX_ADD_SHORTCUT, getString(R.string.create_shortcut), R.drawable.ic_ctx_app_shortcut))
         if (flags and CTX_FIND_METADATA != 0L) add(Simple(CTX_FIND_METADATA, getString(R.string.find_metadata), R.drawable.ic_ctx_delete))
         if (flags and CTX_ADD_FOLDER_PLAYLIST != 0L) add(Simple(CTX_ADD_FOLDER_PLAYLIST, getString(R.string.this_folder), R.drawable.ic_ctx_add_to_playlist))
         if (flags and CTX_ADD_FOLDER_AND_SUB_PLAYLIST != 0L) add(Simple(CTX_ADD_FOLDER_AND_SUB_PLAYLIST, getString(R.string.all_subfolders), R.drawable.ic_ctx_add_to_playlist))



More information about the Android mailing list