Do not load images with FFImageLoading

420 Views Asked by At

I am consuming an API in my application and I need to load images, I am doing it with FFImageLoading. The images are in a json

I follow the steps of adding FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true); in MyActivity and AppDelegate


My class
 public partial class Article
    {
        [JsonProperty("source")]
        public Source Source { get; set; }

        [JsonProperty("author")]
        public string Author { get; set; }

        [JsonProperty("title")]
        public string Title { get; set; }

        [JsonProperty("description")]
        public string Description { get; set; }

        [JsonProperty("url")]
        public Uri Url { get; set; }

        [JsonProperty("urlToImage")]
        public Uri UrlToImage { get; set; }

        [JsonProperty("publishedAt")]
        public DateTimeOffset PublishedAt { get; set; }

        [JsonProperty("content")]
        public string Content { get; set; }
    }

View

<ffimageloading:CachedImage HorizontalOptions="Center"
                                                VerticalOptions="Center"
                                                WidthRequest="300"
                                                HeightRequest="300"
                                                DownsampleToViewSize="true"
                                                Source = "{Binding UrlToImage}">
                    </ffimageloading:CachedImage>

Result, i using a collectionvieww

0

There are 0 best solutions below