Skip to content

Give the Android app its launcher icon - #70

Merged
octopranav merged 1 commit into
mainfrom
launcher-icon
Sep 24, 2026
Merged

octopranav merged 1 commit into
mainfrom
launcher-icon

Conversation

@octopranav

Copy link
Copy Markdown
Owner

What changes

  • The icon. The app now has the site's mark as its launcher icon: four bars at levels 1, 4, 7 and 10. Before, it showed Android's default. design/build-icons.mjs, which already draws the favicon and the installable web icon, now also writes five Android files:
    • mipmap-anydpi/ic_launcher.xml: the adaptive icon, with background, foreground and monochrome layers
    • drawable/launcher_bars.xml: the four bars in their tints, on the 108-unit adaptive canvas, placed by the web icon's masked geometry measured against the 72 units a launcher shows
    • drawable/launcher_bars_monochrome.xml: the themed-icon layer, where each bar's opacity is its ink against the ground in CIE lightness (1, 0.79, 0.50, 0.27), so the ramp survives one colour
    • values/launcher.xml and values-night/launcher.xml: the icon's fixed ground, and the starting window's ground for each theme
  • The starting window. A new Theme.Gpc paints the window behind the app with the page's own ground in either theme. On Android 12 and later the icon is shown on that window while the app starts. It used the platform light theme's background, so a dark-mode launch flashed light before the first frame.
  • Line endings. The generated files are pinned to LF in .gitattributes, like the site's, because --check compares bytes.
  • The light ground now comes from the tokens instead of a copy in the script. The site's five icons are byte for byte unchanged.

Checks

  • node design/build-icons.mjs --check: 10 icons match. The site's five were unchanged before and after regenerating.
  • Deliberate break: hand-editing one tint in launcher_bars.xml failed the check, naming the file. Restored.
  • Emulator:
    • The drawer shows the bars inside the launcher's circle.
    • With themed icons on, the home screen shows the bars in the wallpaper's colour, fading by opacity. Themed icons were switched back off afterwards.
    • A dark-mode launch showed the icon on the dark ground (#0A151B) with no light frame. A light-mode launch showed the light ground.
  • The store listing needs a 512-pixel square. The site's icon-512.png, from the same script, already is one.

The app showed the platform's default icon. It now has the site's: four bars
at levels 1, 4, 7 and 10, the ten-cell mark reduced to its ramp. The same
script that draws the favicon and the installable web icon writes it, from
the same tokens and the same masked geometry, as an adaptive icon in vector
layers, so CI's existing icon check covers it and the generated files are
pinned to LF like the site's.

With themed icons on, the monochrome layer carries the ramp in opacity, each
bar as opaque as its tint is dark against the ground. The window behind the
app while it starts, where Android 12 and later shows the icon, is now the
page's own ground in either theme instead of the platform's light
background, so a launch in dark mode no longer flashes light first.

The script now reads the light ground from the tokens rather than a copy of
it; the site's icons are byte for byte unchanged.
@octopranav
octopranav merged commit 1b1408c into main Sep 24, 2026
21 checks passed
@octopranav
octopranav deleted the launcher-icon branch September 24, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant