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.

What is correct path for loading placeholders in Xamarin Android projects?

See original GitHub issue

I have an image in a Xamarin Android project that does not seen to load. In the console, I’m getting

Not found: placeholderProfileImage.png from Filepath

every time an image view comes onto the screen.

My call looks like this:

// use FFImageLoading library to asynchronously:
ImageService.Instance
    .LoadUrl(acquaintance.SmallPhotoUrl, TimeSpan.FromHours(Settings.ImageCacheDurationHours))  // get the image from a URL
    .LoadingPlaceholder("placeholderProfileImage.png")                                          // specify a placeholder image
    .Transform(new CircleTransformation())                                                      // transform the image to a circle
    .Error(e => System.Diagnostics.Debug.WriteLine(e.Message))                                  // if there is an error loading the image, print it to debug console
    .IntoAsync(viewHolder.ProfilePhotoImageView);                                               // load the image into the ImageView

The placeholderProfileImage.png exists as an Android resource in both the drawable and mipmap folders, but FFImageLoading can’t seem to find it. Do I need to provide a full path?

This all works great in my Xamarin Forms project, with the same placeholder image in the drawable folder.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
daniel-luberdacommented, Dec 15, 2016

On Android:

  • CompiledResource = Drawables (eg. Resources->Drawable folder)
  • ApplicationBundle = Assets

What’s not working for you?

0reactions
kernel-codercommented, Jul 2, 2020

CachedImage::LoadingPlaceholder I think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build Properties - Xamarin
This document will list all supported properties in the Xamarin.Android build process.
Read more >
Some image path are not loaded in ffimageloading ...
I am working in xamarin.forms. I have one list page where I want to load set of images. Images are load from web...
Read more >
Activity embedding
Two activity splits layed out left to right but with different split ratios. Placeholders. Placeholder activities are empty secondary activities that occupy an ......
Read more >
Easily Load Images into Recyclerview using FFImageLoading
Loading images from the internet using a normal web request could crash ... Xamarin Android Course ⇢ http://bit.ly/complete-xamarin-course1 ...
Read more >
Creating Mobile Apps with Xamarin.Forms: Infrastructure
Go into Visual Studio or Xamarin Studio, and load any Xamarin.Forms solution created so far, such as NoteTaker1.
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