Skip to content

Add monochrome icon for Android 13+ themed icon support - #55

Open
sahariya-divyansh wants to merge 1 commit into
criticalAY:masterfrom
sahariya-divyansh:feature/monochrome-icon
Open

Add monochrome icon for Android 13+ themed icon support#55
sahariya-divyansh wants to merge 1 commit into
criticalAY:masterfrom
sahariya-divyansh:feature/monochrome-icon

Conversation

@sahariya-divyansh

Copy link
Copy Markdown
Contributor

Adds a monochrome vector drawable derived from the existing adaptive icon
foreground, and references it from ic_launcher.xml and ic_launcher_round.xml
so Neer's launcher icon supports Android 13+'s themed icon feature when
enabled in system settings.

Closes #35

Purpose / Description

Android 13 (API 33) introduced themed (monochrome) app icons as part of
Material You when a user enables "Themed icons" in system wallpaper
settings, supported launchers re-tint app icons to match the device's
wallpaper-derived color palette. Neer's adaptive icon currently defines
only background and foreground layers, so it is skipped by this
system feature and always renders in its fixed brand colors regardless
of the user's theming preference. This PR adds the missing monochrome
layer so Neer participates correctly in system-wide icon theming,
bringing it in line with platform conventions users increasingly expect
on modern Android.

Fixes

Approach

Added ic_launcher_monochrome.xml, a single-color vector drawable
derived from the existing ic_launcher_foreground artwork. Per Android's
adaptive icon specification, a monochrome layer must be a flat alpha
mask with no gradients or embedded color the system applies its own
tint at render time so the path geometry was preserved from the
foreground asset while stripping fill/gradient definitions down to a
single opaque path.

Referenced the new drawable via a <monochrome> tag inside both
ic_launcher.xml and ic_launcher_round.xml under
mipmap-anydpi-v26, alongside the existing <background> and
<foreground> entries. No other resources, layouts, or Gradle/SDK
configuration were touched the app's compileSdk/targetSdk (37)
already exceed the API 33 minimum this feature requires, so no version
bump was necessary.

The change is intentionally scoped to these three files to keep the
diff minimal and easy to review.

How Has This Been Tested?

Built and installed the debug variant (assembleDebug /
installDebug) on a physical Motorola Edge 60 Fusion running
Android 16. Confirmed the app installs and launches without issue and
that the existing (non-themed) launcher icon renders identically to
before this change i.e., no regression to background/foreground
rendering.

I was not able to visually confirm the wallpaper-tinted rendering on
this specific device, as Motorola's myUX launcher does not appear to
expose the system "Themed icons" toggle in this build, despite running
Android 16. Rather than rely on unverifiable visual output, I validated
correctness structurally: confirmed ic_launcher_monochrome.xml is a
single-path vector with no gradient or hardcoded fill color (matching
Android's documented requirement for monochrome layers), and confirmed
the <monochrome> tag is correctly declared in both adaptive icon XML
files following the same pattern as <background>/<foreground>.
Happy to re-verify visually against a Pixel/stock-launcher emulator if
preferred during review.

Screenshots:

App icon - default (unchanged) rendering:
Screenshot_20260815-112438_Moto App Launcher

App icon - after wallpaper/style change (no visible re-tint observed
on this device/launcher, included to document the tested state):

Screenshot_20260815-113422_Moto App Launcher

Learning (optional, can help others)

Reference: Android adaptive icon and themed icon guidance
https://developer.android.com/develop/ui/views/launch/icon_design_adaptive

Key takeaway: monochrome layer support is a launcher responsibility,
not guaranteed purely by API level. Several OEM launchers (this
Motorola myUX build included) do not currently expose the "Themed
icons" toggle even on Android versions that support it at the
framework level, which makes device-side visual testing unreliable as
a sole verification method structural correctness of the drawable
and XML declaration is the more dependable check.

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner
    N/A: this change is a launcher icon resource only, with no
    interactive UI or new/changed strings for the scanner to audit.

Adds a monochrome vector drawable derived from the existing adaptive
icon foreground, and references it from ic_launcher.xml and
ic_launcher_round.xml so Neer's launcher icon supports Android 13+'s
themed icon feature when enabled in system settings.

Closes criticalAY#35
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.

Add monochrome icon.

1 participant