Open kamilchlebek opened 1 year ago
we have the same issue, generated icons for android are useless
Same here...
Same :)
Same here!
I didn't get the workaround, the inset... I'm using capacitor and I'm experiencing the 1px black line at right and botton of icon.
I would like to know how should I update my AndroidManifest.xml with:
android:inset="16.6%"
I did the workaround, but have to manually edit while capacitor-assets is not fixed. I've found the android:inset in those two files in a search with grep:
grep -r 'android:inset' android/app/src/main/res
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: <inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: <inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: <inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: <inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
So, after the changes to 16.6% it worked!
I did the workaround, but have to manually edit while capacitor-assets is not fixed. I've found the android:inset in those two files in a search with grep:
grep -r 'android:inset' android/app/src/main/res android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: <inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" /> android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: <inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" /> android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: <inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" /> android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: <inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
So, after the changes to 16.6% it worked!
This worked for me!
PR #534 will fix this, where are you ionic devs?
I noticed small issue when trying to setup splash screen on Android >= 12.
Namely there's a little bit of black color on the edges of the icon.
The issue is related with https://github.com/ionic-team/capacitor-assets/pull/424 which added
android:inset="16.7%"
to theforeground
&background
. I suppose that due to calculation inaccuracy (1/6 ≈ 16.7%), the background is too small and doesn't cover default background that lies underneath.Workaround
Change:
android:inset="16.7%"
toandroid:inset="16.6%"
Actual (left), Expected (right)
Here's a StackOverflow thread that describes how are icons rendered:
It links to android source that explains where does that black color come from: