ic_launcher.xml
25 lines · 1.4 KB
Changed in: 0.5.0
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Adaptive icon geometry (the numbers that matter): |
| 4 | · layer canvas ......... 108dp |
| 5 | · mask viewport ........ ~72dp visible |
| 6 | · SAFE ZONE ............ 66dp circle — the largest area no OEM mask |
| 7 | (circle / squircle / rounded-square / teardrop) |
| 8 | ever crops. |
| 9 | For a circular full-bleed logo the correct size is exactly the safe |
| 10 | zone: 66dp of 108dp = 61.11% of the layer. ic_launcher_foreground.png |
| 11 | is generated to precisely that geometry (badge 264px centered on a |
| 12 | 432px transparent canvas). The previous <inset 25%> rendered the badge |
| 13 | at 54dp — only 82% of its allowed size — which is why it floated small |
| 14 | inside the launcher/splash circle. Do NOT re-wrap this foreground in |
| 15 | an inset; the spacing is baked into the asset, pixel-exact. |
| 16 | |
| 17 | No <monochrome> layer on purpose: the badge is photographic, and a |
| 18 | themed-icon silhouette derived from it would collapse to a featureless |
| 19 | disc. Android 13 themed launchers fall back to the tinted-background |
| 20 | treatment, which reads better than a blank circle. |
| 21 | --> |
| 22 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
| 23 | <background android:drawable="@color/ic_launcher_background" /> |
| 24 | <foreground android:drawable="@drawable/ic_launcher_foreground" /> |
| 25 | </adaptive-icon> |


