From 1e62c938d718d4f0be21d3e04ad45cff3d962afa Mon Sep 17 00:00:00 2001 From: wh201906 Date: Sat, 27 Jan 2024 23:37:06 +0800 Subject: [PATCH] Use adaptive launcher icon Replace android:icon="@drawable/icon" with android:icon="@mipmap/icon" icon_foreground is converted from SerialTest-nobg-scaled.svg icon_monochrome is converted from SerialTest-nobg-notext-scaled.svg The scale factor is 0.65 Thanks @xmha97 and @sebastien46 for providing ideas! --- src/android/AndroidManifest.xml | 2 +- src/android/res/drawable/icon_foreground.xml | 16 +++++++++++ src/android/res/drawable/icon_monochrome.xml | 5 ++++ src/android/res/mipmap-anydpi-v26/icon.xml | 6 +++++ .../{drawable-hdpi => mipmap-hdpi}/icon.png | Bin .../{drawable-ldpi => mipmap-ldpi}/icon.png | Bin .../{drawable-mdpi => mipmap-mdpi}/icon.png | Bin .../{drawable-xhdpi => mipmap-xhdpi}/icon.png | Bin .../icon.png | Bin .../icon.png | Bin src/android/res/{drawable => mipmap}/icon.png | Bin .../raw/SerialTest-nobg-notext-scaled.svg | 10 +++++++ src/icon/raw/SerialTest-nobg-scaled.svg | 25 ++++++++++++++++++ 13 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 src/android/res/drawable/icon_foreground.xml create mode 100644 src/android/res/drawable/icon_monochrome.xml create mode 100644 src/android/res/mipmap-anydpi-v26/icon.xml rename src/android/res/{drawable-hdpi => mipmap-hdpi}/icon.png (100%) rename src/android/res/{drawable-ldpi => mipmap-ldpi}/icon.png (100%) rename src/android/res/{drawable-mdpi => mipmap-mdpi}/icon.png (100%) rename src/android/res/{drawable-xhdpi => mipmap-xhdpi}/icon.png (100%) rename src/android/res/{drawable-xxhdpi => mipmap-xxhdpi}/icon.png (100%) rename src/android/res/{drawable-xxxhdpi => mipmap-xxxhdpi}/icon.png (100%) rename src/android/res/{drawable => mipmap}/icon.png (100%) create mode 100644 src/icon/raw/SerialTest-nobg-notext-scaled.svg create mode 100644 src/icon/raw/SerialTest-nobg-scaled.svg diff --git a/src/android/AndroidManifest.xml b/src/android/AndroidManifest.xml index b455d51..8775b99 100644 --- a/src/android/AndroidManifest.xml +++ b/src/android/AndroidManifest.xml @@ -9,7 +9,7 @@ - + diff --git a/src/android/res/drawable/icon_foreground.xml b/src/android/res/drawable/icon_foreground.xml new file mode 100644 index 0000000..8f5a7dd --- /dev/null +++ b/src/android/res/drawable/icon_foreground.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/src/android/res/drawable/icon_monochrome.xml b/src/android/res/drawable/icon_monochrome.xml new file mode 100644 index 0000000..194b58e --- /dev/null +++ b/src/android/res/drawable/icon_monochrome.xml @@ -0,0 +1,5 @@ + + + + diff --git a/src/android/res/mipmap-anydpi-v26/icon.xml b/src/android/res/mipmap-anydpi-v26/icon.xml new file mode 100644 index 0000000..479386f --- /dev/null +++ b/src/android/res/mipmap-anydpi-v26/icon.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/android/res/drawable-hdpi/icon.png b/src/android/res/mipmap-hdpi/icon.png similarity index 100% rename from src/android/res/drawable-hdpi/icon.png rename to src/android/res/mipmap-hdpi/icon.png diff --git a/src/android/res/drawable-ldpi/icon.png b/src/android/res/mipmap-ldpi/icon.png similarity index 100% rename from src/android/res/drawable-ldpi/icon.png rename to src/android/res/mipmap-ldpi/icon.png diff --git a/src/android/res/drawable-mdpi/icon.png b/src/android/res/mipmap-mdpi/icon.png similarity index 100% rename from src/android/res/drawable-mdpi/icon.png rename to src/android/res/mipmap-mdpi/icon.png diff --git a/src/android/res/drawable-xhdpi/icon.png b/src/android/res/mipmap-xhdpi/icon.png similarity index 100% rename from src/android/res/drawable-xhdpi/icon.png rename to src/android/res/mipmap-xhdpi/icon.png diff --git a/src/android/res/drawable-xxhdpi/icon.png b/src/android/res/mipmap-xxhdpi/icon.png similarity index 100% rename from src/android/res/drawable-xxhdpi/icon.png rename to src/android/res/mipmap-xxhdpi/icon.png diff --git a/src/android/res/drawable-xxxhdpi/icon.png b/src/android/res/mipmap-xxxhdpi/icon.png similarity index 100% rename from src/android/res/drawable-xxxhdpi/icon.png rename to src/android/res/mipmap-xxxhdpi/icon.png diff --git a/src/android/res/drawable/icon.png b/src/android/res/mipmap/icon.png similarity index 100% rename from src/android/res/drawable/icon.png rename to src/android/res/mipmap/icon.png diff --git a/src/icon/raw/SerialTest-nobg-notext-scaled.svg b/src/icon/raw/SerialTest-nobg-notext-scaled.svg new file mode 100644 index 0000000..1561c86 --- /dev/null +++ b/src/icon/raw/SerialTest-nobg-notext-scaled.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icon/raw/SerialTest-nobg-scaled.svg b/src/icon/raw/SerialTest-nobg-scaled.svg new file mode 100644 index 0000000..7c3f11e --- /dev/null +++ b/src/icon/raw/SerialTest-nobg-scaled.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + +