开发者

How to display gallery from fetching the image data from webservice in android?

we are working on a project where image data is coming from webservice and we need to display that image bitmap data in our phones, the images could have more than 500, so when we download data form webservice and displaying then in gallery with converting image data into bitmap, outofmemory error is coming and program crashes.

Please give suggestion to how to achieve thi开发者_开发问答s.


Don't keep the whole set in memory.

Either

  • download and convert lazily as the user scrolls, or
  • download, convert, and store to disk a few images at a time, and then load them lazily as the user scrolls.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜