You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android's resource resolver (API 24+) walks every child of the parent
locale when it can't find an exact or parent-language match, so an
ar-PK device with only drawable-ar-rAE/ supplied would match the AE
icon. Insert the default app icon into drawable-<lang>/ (and
mipmap-*-<lang>/) when only region-qualified variants are provided, so
the parent-locale lookup succeeds before sibling matching kicks in.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/developer-guide/Miscellaneous-Features.asciidoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -469,6 +469,8 @@ On Android the build generates locale-qualified drawable resources at every dens
469
469
470
470
No code changes are required—Android's resource framework switches icons when the locale changes.
471
471
472
+
When you supply a region-qualified icon (such as `cn1_icon_ar_AE.png`) without a matching language-only variant, the build also emits the *default* (non-localized) icon into `drawable-<lang>/` and the matching `mipmap-*-<lang>/` directories. This barrier is required because Android's resource resolver (API 24+) walks every child of the parent locale when it can't find an exact or parent-language match, and would otherwise pick `ar-rAE` for, say, an `ar-PK` device. The barrier short-circuits that lookup so only devices whose region matches the supplied variant receive the localized icon. If you also ship a language-only file (for example `cn1_icon_ar.png`) it is used as the barrier instead, so you keep full control of the fallback icon for Arabic speakers outside AE.
473
+
472
474
===== iOS behaviour
473
475
474
476
iOS doesn't localize launcher icons natively, so Codename One wires up https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname[alternate app icons] for you:
0 commit comments