[PATCH] android: add monochrome icon
Export this patch
---
I copied ic_launcher_foreground.xml and replaced the pathData value with
the one from ic_stat_name.xml.
Hm, I'm not sure this will work well. The size and position of the icon
in ic_stat_name.xml is different from the launcher icon.
Maybe a better approach is to start with the launcher icon and then
make it monochrome?
.../res/drawable/ic_launcher_monochrome.xml | 18 ++++++++++++++++++
.../main/res/mipmap-anydpi-v26/ic_launcher.xml | 1 +
2 files changed, 19 insertions(+)
create mode 100644 android/app/src/main/res/drawable/ic_launcher_monochrome.xml
diff --git a/android/app/src/main/res/drawable/ic_launcher_monochrome.xml b/android/app/src/main/res/drawable/ic_launcher_monochrome.xml
new file mode 100644
index 0000000..d79635b
--- /dev/null
+++ b/android/app/src/main/res/drawable/ic_launcher_monochrome.xml
@@ -0,0 +1,18 @@
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <group android:scaleX="1.5354404"
+ android:scaleY="1.5354404"
+ android:translateX="32.4"
+ android:translateY="32.4">
+ <path
+ android:pathData="M0.014,0C0.0093,9.3784 0.0047,18.7568 0,28.1352C1.8757,26.2596 3.7514,24.3839 5.627,22.5082L28.1352,22.5082L28.1352,0L0.014,0zM10.7787,4.6039L12.6581,4.6039L12.6581,7.7887L15.4771,7.7887L15.4771,4.6039L17.3566,4.6039L17.3566,7.7887L20.2277,7.7887L20.2277,9.6681L17.3566,9.6681L17.3566,12.4871L20.2277,12.4871L20.2277,14.3666L17.3566,14.3666L17.3566,17.5509L15.4771,17.5509L15.4771,14.3666L12.6581,14.3666L12.6581,17.5509L10.7787,17.5509L10.7787,14.3666L7.9075,14.3666L7.9075,12.4871L10.7787,12.4871L10.7787,9.6681L7.9075,9.6681L7.9075,7.7887L10.7787,7.7887L10.7787,4.6039zM12.6581,9.6681L12.6581,12.4871L15.4771,12.4871L15.4771,9.6681L12.6581,9.6681z"
+ android:strokeLineJoin="miter"
+ android:strokeWidth="0.3727919"
+ android:fillColor="#3f51b5"
+ android:strokeColor="#00000000"
+ android:strokeLineCap="butt"/>
+ </group>
+ </vector>
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 7353dbd..1084c24 100644
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
+ <monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>
\ No newline at end of file
--
2.39.0
Thanks for the patch!