I am trying ti display the SVG image in my xamarin.form application, there are no issues to display the SVG image in iOS but not able to display the same image in the android application.
here is my code to display the svg image
<ContentView.Resources> <ResourceDictionary> <ffimageloadingsvg:SvgImageSourceConverter x:Key="SvgImageSourceConverter"></ffimageloadingsvg:SvgImageSourceConverter> </ResourceDictionary> </ContentView.Resources> <ContentView.Content> <ffimageloadingsvg:SvgCachedImage Source="{Binding SvgFileName, Converter={StaticResource SvgImageSourceConverter}}" Grid.Column="0" WidthRequest="200" HeightRequest="600" ReplaceStringMap="{Binding BodyMapreplceStrings}" /> </ContentView.Content>
And from View Model I am binding the image as following
public string SvgFileName
{
get { return _svgFileName; }
set
{
_svgFileName = value;
OnPropertyChanged();
}
}
and
SvgFileName="Flower.svg";
and given svg image in Resources for iOS and in Resources ->drawable
in MainActivity added following lines
CachedImageRenderer.Init(true);
var ignore = typeof(SvgCachedImage);
Is there anything I am missing?