fix(android): make the new launcher icon actually display (adaptive icon + roundIcon) #74
7 changed files with 28 additions and 165 deletions
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.
commit
faf4d1bb15
|
|
@ -36,9 +36,9 @@
|
|||
android:allowBackup="false"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="false"
|
||||
android:icon="@mipmap/onionwire_app_icon"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.OnionWire">
|
||||
|
||||
|
|
|
|||
BIN
android/app/src/main/res/drawable-nodpi/onionwire_app_icon.png
Normal file
BIN
android/app/src/main/res/drawable-nodpi/onionwire_app_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- OnionWire adaptive-icon background: deep indigo-to-purple gradient that
|
||||
matches the app's dark theme and lets the cyan-networked onion bulb pop. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#0B0B10"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#1A0A2E"
|
||||
android:pathData="M0,0 L108,0 L108,108 L0,108 Z"
|
||||
android:fillAlpha="0.55" />
|
||||
<!-- subtle radial highlight toward the center so the icon has depth on
|
||||
launchers that blur the background -->
|
||||
<path
|
||||
android:fillColor="#3D1A5C"
|
||||
android:fillAlpha="0.28"
|
||||
android:pathData="M54,20 m-34,0 a34,34 0 1,1 68,0 a34,34 0 1,1 -68,0" />
|
||||
</vector>
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- OnionWire launcher foreground: Tor onion bulb with layered rings and
|
||||
cyan network-connectivity lines. Keep art inside the 66dp safe zone
|
||||
(the inner 66x66 of the 108x108 viewport) so it survives the adaptive
|
||||
icon mask on every OEM launcher. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
|
||||
<!-- translucent backdrop so the bulb reads against any mask -->
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:fillAlpha="0.18"
|
||||
android:pathData="M54,30 m-26,0 a26,26 0 1,1 52,0 a26,26 0 1,1 -52,0" />
|
||||
|
||||
<!-- onion bulb: deep purple-violet built from nested ellipses -->
|
||||
<path
|
||||
android:fillColor="#4A148C"
|
||||
android:pathData="M54,30 C74,30 86,48 86,64 C86,78 72,86 54,86 C36,86 22,78 22,64 C22,48 34,30 54,30 Z" />
|
||||
<path
|
||||
android:fillColor="#7B1FA2"
|
||||
android:pathData="M54,34 C70,34 80,48 80,62 C80,75 69,82 54,82 C39,82 28,75 28,62 C28,48 38,34 54,34 Z" />
|
||||
<path
|
||||
android:fillColor="#9C27B0"
|
||||
android:pathData="M54,38 C66,38 74,49 74,60 C74,71 65,76 54,76 C43,76 34,71 34,60 C34,49 42,38 54,38 Z" />
|
||||
|
||||
<!-- glossy highlight -->
|
||||
<path
|
||||
android:fillColor="#CE93D8"
|
||||
android:fillAlpha="0.55"
|
||||
android:pathData="M46,44 C46,44 50,38 56,38 C62,38 66,44 66,44 C66,44 60,56 56,58 C52,60 48,56 46,44 Z" />
|
||||
|
||||
<!-- sprout crown at top: three-point silhouette -->
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.2"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#38F2C7"
|
||||
android:fillAlpha="0.9"
|
||||
android:pathData="M54,30 L50,20 L54,26 L58,20 Z" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="1.6"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M54,30 L54,19" />
|
||||
|
||||
<!-- layered rings -->
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.0"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M36,42 C30,56 33,74 46,82" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.0"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M72,42 C78,56 75,74 62,82" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.0"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M40,38 C30,52 34,70 50,80" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.0"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M68,38 C78,52 74,70 58,80" />
|
||||
|
||||
<!-- vertical seam -->
|
||||
<path
|
||||
android:strokeColor="#0B0B10"
|
||||
android:strokeWidth="1.8"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M54,32 L54,84" />
|
||||
|
||||
<!-- cyan network lines + nodes -->
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="1.0"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M42,52 L50,48 L42,44" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="1.0"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M66,52 L58,48 L66,44" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="1.0"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M54,56 L54,64" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="1.0"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M46,60 L54,64 L62,60" />
|
||||
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M42,52 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M50,48 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M42,44 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M66,52 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M58,48 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M66,44 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M54,56 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M54,64 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M46,60 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
<path
|
||||
android:fillColor="#38F2C7"
|
||||
android:pathData="M62,60 m-1.4,0 a1.4,1.4 0 1,1 2.8,0 a1.4,1.4 0 1,1 -2.8,0" />
|
||||
|
||||
</vector>
|
||||
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Round variant for launchers that ask for android:roundIcon (Pixel
|
||||
Launcher, Samsung One UI). Must render the same artwork as ic_launcher.xml
|
||||
— a stale roundIcon is exactly how an "old icon" survives an icon change,
|
||||
because those launchers prefer roundIcon over icon. -->
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/onionwire_app_icon" />
|
||||
<foreground android:drawable="@android:color/transparent" />
|
||||
</adaptive-icon>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 150 KiB |
Loading…
Reference in a new issue