uno
uno copied to clipboard
[Android][iOS] Image Asset Named with ISO Code doesn't Work
Current behavior
When an image asset is named with an ISO code representing a language the image doesn't work on Android and iOS.
For example: image_bg.png
.
The image on the left is named Doge.png
and the Image on the right is named Doge_bg.png
.
UWP:
Android:
Expected behavior
The image should work properly.
How to reproduce it (as minimally and precisely as possible)
- Download SampleImg.zip
- Open the solution in Visual Studio
- Start the application in UWP
- Notice two images
- Start the application on Android or iOS
- Notice only one image
Workaround
Rename the image asset.
Example: Doge_bg.png
would not work but Doge.png
would work.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
Uno 4.4.13 & 4.5.0-dev.222
Affected platforms
iOS, Android
IDE
Visual Studio 2022
IDE version
17.2.6
Relevant plugins
No response
Anything else we need to know?
I did not test on other platforms.
This is likely related to https://github.com/unoplatform/uno/issues/7431
Related issue:
Related to https://github.com/unoplatform/nventive-private/issues/404
Current behavior
Images that use CA without letters beside it, do not appear
Expected behavior
Images should appear
How to reproduce it (as precisely as possible)
Open the app
Sample: ImageDisplayPath.zip
Output Debug: Uno.Helpers.DrawableHelper[0] Couldn't find drawable with key: CA Uno.Helpers.DrawableHelper[0] Couldn't find drawable with key: CA Uno.Helpers.DrawableHelper[0] Couldn't find drawable with key: ca_Flag Uno.Helpers.DrawableHelper[0] Couldn't find drawable with key: ca_Flag
[ImageView] Unable to find resource: 2131165184 [ImageView] android.content.res.Resources$NotFoundException: Resource ID #0x7f070000 [ImageView] at crc64122dcf5ad656876d.FrameworkElement.06-14 14:51:01.340 W/ImageView( 4267): at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:234) [ImageView] at android.content.res.Resources.getDrawableForDensity(Resources.java:982)