FFimageloading CachedImage not showing

Hey guys, I'm using an API to get a cached image ( I'm able to get the image from the API) and displaying it like so:
var contentPage = new ContentPage();
var layout = new StackLayout();
var profilePhoto = new CachedImage
{
Aspect = Aspect.AspectFill,
Transformations = new System.Collections.Generic.List<FFImageLoading.Work.ITransformation>()
{
new BlurredTransformation(p.blurAmount),
new CircleTransformation(1, "e8e8e8")
},
WidthRequest = 222,
HeightRequest = 222,
DownsampleToViewSize = true,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.CenterAndExpand,
Source = p.Image.Source //(p is the object which contains an Image attribute which is assigned the CachedImage response from API )
};
layout.Children.add(profilePhoto);
contentPage.content = layout;

now I have added labels as well to the content page and they show up but the image is blank. I have added CachedImageRenderer.Init(); in my MainActivity.cs like so:
protected override void OnCreate(Bundle bundle)
{
UserDialogs.Init(this);

TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

base.OnCreate(bundle);

global::Xamarin.Forms.Forms.Init(this, bundle);
CachedImageRenderer.Init(); //<<--------------Here
LoadApplication(new App());

}
It just doesn't show up, and there aren't any errors either. What could the issue be?

Sign In or Register to comment.