uno icon indicating copy to clipboard operation
uno copied to clipboard

[Android][iOS] Image Asset Named with ISO Code doesn't Work

Open Soap-141 opened this issue 2 years ago • 3 comments

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: Capture_76

Android: Capture_75

Expected behavior

The image should work properly.

How to reproduce it (as minimally and precisely as possible)

  1. Download SampleImg.zip
  2. Open the solution in Visual Studio
  3. Start the application in UWP
  4. Notice two images
  5. Start the application on Android or iOS
  6. 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.

Soap-141 avatar Jul 13 '22 19:07 Soap-141

This is likely related to https://github.com/unoplatform/uno/issues/7431

jeromelaban avatar Aug 01 '22 15:08 jeromelaban

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)

MartinZikmund avatar Jul 31 '23 08:07 MartinZikmund