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

Image caching/sharing in cross-platform fashion

$
0
0

We have number of images used as app assets, for case of simplicity, let's say 10 images only.

As far as I understand, Xamarin.Forms will **not **cashe these images, so if I have these 10 images showing in my toolbar (this is just to explain issue, we would not really put 10 images in a tiny toolbar) and I have 5 pages showing same toolbar, that means the 10 images will each be loaded 5 times resulting in total 50 images loaded in memory (5 pages x 10 images = 50 images). I would like to load only 10 images and use them any number of times in the GUI.

In addition, if I have to add these 10 images in our repository, I would have to add at least 3 copies of same image to our repository (1 for Android, 1 for IOS, 1 for UWP). I'd like to have one single copy of image that can be shared among all projects and loaded into memory only once but displayed in all 5 pages.

So, these 2 issues make be believe there should be a better cross-platform solution so that I can share same image across all 3 platforms and I load an image only once in memory regardless how many times it shows in the UI.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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