fix(android): make the new launcher icon actually show up as an adaptive icon
The icon change landed as a bitmap dropped straight into res/mipmap-anydpi-v26/ and wired to android:icon only, so the installed app kept showing the old art: - android:roundIcon still pointed at @mipmap/ic_launcher (the old vector adaptive icon). Launchers that prefer roundIcon — Pixel Launcher, Samsung One UI — render it in preference to android:icon, so the new bitmap never appeared. Verified on the ow35 emulator drawer: old cyan/green line-art onion while android:icon was already the new PNG. - a bitmap under mipmap-anydpi-v26 is a legacy icon, not an adaptive one: the launcher pads it into the mask itself and it is not density-aware. Now: - drawable-nodpi/onionwire_app_icon.png: the artwork squared to 432x432 with the logo at 62% of the canvas (inside the 66dp/108dp safe zone) over a seamless blurred backdrop of itself, so no launcher mask clips the logo. - mipmap-anydpi-v26/ic_launcher.xml and ic_launcher_round.xml: adaptive icons with that bitmap as the background layer and a transparent foreground. - AndroidManifest.xml: icon=@mipmap/ic_launcher, roundIcon=@mipmap/ic_launcher_round. - Delete the retired vectors (ic_launcher_background/foreground.xml) and the misplaced mipmap-anydpi-v26/onionwire_app_icon.png.
This commit is contained in:
parent
7ad3679b51
commit
faf4d1bb15
7 changed files with 28 additions and 165 deletions
|
|
@ -1,5 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- OnionWire launcher icon (adaptive).
|
||||
|
||||
The artwork lives in drawable-nodpi/onionwire_app_icon.png as a single
|
||||
432x432 full-bleed bitmap: the networked-onion logo at 62% of the canvas
|
||||
(inside the 66dp/108dp adaptive-icon safe zone) over a seamless blurred
|
||||
backdrop of itself. It is used as the background layer, so the launcher
|
||||
mask can crop the outer edge of the artwork without ever clipping the
|
||||
logo. The foreground layer is transparent on purpose: the whole icon is
|
||||
the bitmap.
|
||||
|
||||
Do not point android:icon at a bitmap in this directory again. A bitmap
|
||||
under mipmap-anydpi-v26 is a *legacy* icon: it is not an adaptive icon, so
|
||||
the launcher pads it into the mask with its own plate and it scales wrong
|
||||
on high-density screens. -->
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
<background android:drawable="@drawable/onionwire_app_icon" />
|
||||
<foreground android:drawable="@android:color/transparent" />
|
||||
</adaptive-icon>
|
||||
Loading…
Reference in a new issue