android - Including thousands of images in Xamarin Forms application -
i have xamarin forms project company work for. have 6000+ images used in 2 ways : thumbnail page , full size page. have both thumbnail image , full size image. thumbnail page shows 12 products @ time, lives in carousel page have 18 content pages within carousel.
i've tried 3 ways of saving/accessing images:
- including them bundle/android resources. works best takes forever build project , on android mean have use expansion files.
- included binary image database when downloading product listing. causes app crash randomly on download.
- downloading of files web. works, on both android , ios, thumbnail screen slows crawl , half of time crashes on android.
has had similar , if so, way did decide go? unfortunately, app have usable offline need images local. i'm kind of in time crunch appreciated!!
i had similar issues someday , understood won't successful standard image class such large amount of images (no memory caching, no task queueing, etc). made cachedimage. it's api compatible replacement image advanced caching capabilities (and other features). try that.
just remember use:
- downsampling feature : way image resized view size save memory
- caching feature (it's enabled default not including
streamimagesourcehave provide custom cache key factory) - use
fileimagesource(app dir) orstreamimagesource(eg. image database) custom cache keys https://github.com/molinch/ffimageloading (see wiki docs)
Comments
Post a Comment