I need to display thousand of images in my Xamrain form app (IOS/Android) but my app is crashing on scrolling with memory waring. so please suggest how to display images in list with clear images cache.
FFImageLoading (CachedImage) instead of ootb Image component.
First, try to use thumbnails!
Then I should suggest to use a scroll with auto-load, I mean, a scroll with a few of the images, and a last element that triggers the load of another few everytime you reach the bottom, unloading (if possible) the older ones if you have to much memory on use.
And only load a full image if you touch it.
I will go with the suggestion by Namyslaw, for using the FFImageLoading (if the data is not changing too frequently).
Additionally it seems you're trying to bump into with the whole data at once, do not do that if you do so, try some better approach like using PullToRefresh.
in RefreshCommand you must call your service with re-gaining parameters (like range of records to be pulled from DB) and hit the service, this will save you from crashing you app.
Hope it helps
-- N Baua
Like @clopez said dont load all items at once.
Take a look at this thread:
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies