Skip to content
Fabien Molinet edited this page Dec 17, 2015 · 11 revisions

Source

On Android images can be loaded from Internet, Resources, Assets or File.

Internet

Or from an URL. In this case the image is cached (by default 30 days but there is an optional TimeSpan so you can choose yours).

ImageService.LoadUrl(urlToImage).Into(_imageView);

Ressources

If you don't know what are resources you can read Xamarin resources documentation.

ImageService.LoadCompiledResource(fullPathToImage).Into(_imageView);

Assets

If you don't know what are assets you can read Xamarin asset documentation.

ImageService.LoadFileFromApplicationBundle(fullPathToImage).Into(_imageView);

File

When you want to load the image from a file:

ImageService.LoadFile(fullPathToImage).Into(_imageView);