garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /crates/cartopolis_android/res/mipmap-anydpi-v26/icon.xml

raw

<?xml version="1.0" encoding="utf-8"?>
<!--
  The adaptive launcher icon (API 26+). Without this file a launcher treats
  `@mipmap/icon` as a legacy icon, and eight years of launcher shells do the same
  thing to a legacy icon: shrink it and drop it inside a white rounded blob. The
  app then advertises itself on the home screen as a small fox on a white badge,
  next to every other app drawn edge-to-edge in its own colour.

  Two layers, each 108dp, of which only the central 72dp is guaranteed to survive
  the launcher's mask — the rest is what gets parallaxed and clipped into a
  circle, a squircle or a teardrop depending on the phone. So the background is a
  flat brand colour (nothing to lose at the edges) and the foreground is the fox
  padded to that 108/72 ratio by `build-apk.sh`, which is why `icon_foreground`
  exists as a separate bitmap rather than being `icon` again.

  `mipmap-anydpi-v26/` is density-*less* on purpose: this XML is the same at every
  density and only points at bitmaps that are not. API 25 and below never see it
  and fall back to `mipmap-<density>/icon.png`.

  No `<monochrome>` layer: the themed-icon treatment on API 33+ wants a single
  flat silhouette, and handing it a full-colour fox produces a smear. Worth
  drawing properly one day; worth nothing done badly.
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/brand_surface" />
    <foreground android:drawable="@mipmap/icon_foreground" />
</adaptive-icon>