Add monochrome icon for Android 13+ themed icon support - #55
Open
sahariya-divyansh wants to merge 1 commit into
Open
Add monochrome icon for Android 13+ themed icon support#55sahariya-divyansh wants to merge 1 commit into
sahariya-divyansh wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
backgroundandforegroundlayers, so it is skipped by thissystem 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 drawablederived from the existing
ic_launcher_foregroundartwork. Per Android'sadaptive 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 bothic_launcher.xmlandic_launcher_round.xmlundermipmap-anydpi-v26, alongside the existing<background>and<foreground>entries. No other resources, layouts, or Gradle/SDKconfiguration 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 runningAndroid 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/foregroundrendering.
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.xmlis asingle-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 XMLfiles 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:

App icon - after wallpaper/style change (no visible re-tint observed

on this device/launcher, included to document the tested state):
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
N/A: this change is a launcher icon resource only, with no
interactive UI or new/changed strings for the scanner to audit.