dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

[Android] Images not appearing initially #22827

Open Zachary31415 opened 3 months ago

Zachary31415 commented 3 months ago

Description

When different threads are used to manage properties of Images (e.g. Source or IsVisible), they are not initially changed as expected - they will be changed after second attempt. When everything is operated on UI thread, everything works fine.

In this example, switch changes Image's Source. "Off" changes source to Null, "On" to specific image filename.

Steps to Reproduce

  1. Open App -switch should be Off + car image shouldn't be shown
  2. Turn switch On
  3. Image is not shown
  4. Turn switch Off and On
  5. Image Is shown
  6. Every next attempt to turn Switch on succeeds in showing image

https://github.com/dotnet/maui/assets/171687619/fc0c2b83-a583-42e5-b7fb-31efcb9d64d0

Link to public reproduction project repository

https://github.com/Zachary31415/AndroidMauiIssueReproductiion

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

jaosnz-rep commented 3 months ago

Can repro this issue at Android platform on the latest 17.11 Preview 1.1(8.0.40).