[Xamarin.Forms] SVG image rendering problem on Android
See original GitHub issueI’m using the latest prerelease available Xamarin.FFImageLoading.Svg.Forms 2.2.10-pre-390 together with Xamarin.Forms 2.3.4.231.
Here is the XAML code used:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ffimageloadingsvg="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
x:Class="App.Views.MainPage">
<ContentPage.Content>
<ffimageloadingsvg:SvgCachedImage
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="200"
HeightRequest="200"
Source="http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg"/>
</ContentPage.Content>
</ContentPage>
Is there any known problem when rendering an SVG on Android?
Follow print for comparison of the same screen on both platforms (iOS and Android)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Android 11 SVG rendering blank · Issue #1526
We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11. Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses...
Read more >Why does Xamarin.FFImageLoading SVG is not working ...
1 Answer. It seems that it's a special issue on the Android 11, and the solution is add the reference of the skiasharp...
Read more >Xamarin forms: Android 11 : Embedded resource images ...
Issue with embedded resource image is resolved for me now. I am using svg image in my Xamarin application. I had been using...
Read more >Displaying SVGs in Xamarin.Forms - Damir's Corner
It can create an ImageSource from an SVG so that it can be rendered by Image view just like other image formats. I...
Read more >SVG image is not displaying in android in xamarin.forms
I am trying ti display the SVG image in my xamarin.form application, there are no issues to display the SVG image in iOS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried with 2.2.10-pre-391 with skiasharp 1.58.0 but the issue is not resolved (yet). Svg colors was messed up for android in SkiaSharp 1.57.1. I added a new issue there: https://github.com/mono/SkiaSharp/issues/300
I have the same issue and found that it is related to SkiaSharp 1.57.1! When you downgrade to Xamarin.FFImageLoading.Svg.Forms 2.2.10-pre-375 and then downgrade SkiaSharp to 1.56.1 it will work fine. BTW this is only on some devices like an Asus zenphone 2 and on my android simulator. On other devices the new version somehow works fine. Maybe it is related to android version, I don’t know.