Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to preload Images with ImageSource.FromFile?

$
0
0

This is tested with Android + emulator.

Hi everyone,

I have a image on my page that gets changed every time a user hits a button. The images are in my Resources/drawable folder and get loaded with ImageSource.FromFile. The problem with that is the delay while the image is loaded from file, so I was thinking to preload the ImageSource for every image I want to display. I use a Dictionary for that.

For some reason I still get the delay when replacing the old ImageSource from the Image View with the new one from the Dictionary. Does anyone know a way to do this right? :)


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>