question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images don't load in Xamarin.Forms 4 when using Visual=Material

See original GitHub issue

As described in https://github.com/xamarin/Xamarin.Forms/issues/4674, when using XF4 and setting the ContentPage Visual to Material, images don’t load. The visual code uses ContextThemeWrapper to apply Material themes to controls, but in GlideExtensions.cs:

 if (imageView.Context is Activity activity)
else
return;

Without the else images are loaded correctly.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mikescandycommented, Dec 12, 2018

Got it! Please find a repro at https://github.com/mikescandy/glidex/tree/wrapbug . I forgot that to trigger the issue I had to:

  • upgrade to XF4
  • upgrade to Support Libraries v28.0.0-preview8
  • target Android 9.0 BUT not for the binding project. I think there’s a different Xamarin android bug there Anyway, this shows the issue (and it might be a good starting point if/when you plan to update to the latest libs)
0reactions
mikescandycommented, Dec 14, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Image won't display in <Image> in Xamarin Forms
That's interesting. I have just tried downloading the image and placing it only in the drawable folder and it showed just fine. If...
Read more >
Xamarin Forms, with Release mode, some pictures do not ...
Xamarin Forms, with Release mode, some pictures do not appear on the real device (Android) Images appear on the emulator with Debug and...
Read more >
Displaying images with Xamarin.iOS
This document describes how to display images in Xamarin.iOS. It covers adding images to an app either programmatically or through the iOS ...
Read more >
Xamarin.iOS can't select image asset for Image View
Launch images(splash screen) doesn't work as well. I tried to use LaunchImages asset, Default.png files in Resources folder of Xamarin.iOS ...
Read more >
Share Images and Videos with Essentials Share in Xamarin ...
With the Essentials Share APIs you can easily share text, images, videos or any file from your Xamarin. Forms application to any other ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found