0

I'm making the mobile version of an online store and i have to make it available when offline.

The problem is with photos: the store might have a large number of products, thus photos.

What method of saving the images should i use considering that a phone has some hardware limitation?

What I want is

  1. As small as possible occupied memory with ok performance at reading it.

  2. Writing speed is also something to be considered since downloading so much data will take some time and the user might decide it's not worth the wait(this is a secondary problem though).

4

3 回答 3

3

Consider using Universal Image Loader In my application i load more than 300 photos and i don't get outOfMemoryException error however the library needs to draw some cache. Here's the project on GitHub:

https://github.com/thest1/LazyList

于 2013-08-28T08:42:03.550 回答
3

you can try aquery android library for lazy loading image and its also store images in cache memory so you not need to store it externally...below code may help you.....

AQuery aq = new AQuery(mContext);
aq.id(R.id.image1).image("http://data.whicdn.com/images/63995806/original.jpg");

You can download library from from this link

于 2013-08-28T08:58:36.580 回答
0

I recommend Google Volley for handling networking and image loading. It's a very powerful yet super simple interface for accomplishing all you network needs without worrying about implementation details.

You have 2 built in levels of caching out of the box, and you can always add your own.

于 2013-08-28T08:46:20.900 回答