Subject: Stopping nerve pain (Neuropathy)

From: Ending Neuropathy <[email-masked]>
Date: Thu, 20 Nov 2014 10:20:06 -0800

If you reading this you probably have nerve pain.

Nerve pain affects 1 in 10 Americans (Neuropathy).

Heres how other Americans like you have found hope again.
http://www.runcafejam.com/flashbulbs/incubate/evacuation/deriders.htm

-
Thanks,
Peter Barnsby

[Science Today | USA]
13631 Floyde Cir, Dallas TX
--Unsub-options- 

_#4874297#_

Picasso.with(getApplicationContext()).load(Properties.IMAGE_URL + i).transform(transformation).centerCrop().fit().into(imgeButton);
My problem is that the loading of the image is too slow and I would like the cache to be bigger than it is right now. I see that when working with only one image the cache works properly; The first time the image will not be cached and right after that every time the same code is called, the image will be fetched from the cached and not the network. As the number of images increase, it seems that the cache is too small and images are replaced. Can the cache size be modified / enlarged?

Any help with this will be greatly appreciated.

Thanks

android image picasso image-loading
share|improve this question
asked Oct 30 at 21:37
You can specify your own LRUCache for  to use.

 Picasso picasso = new Picasso.Builder(context).memoryCache(
            new LruCache(cacheSize)).build();
I think by default, Picasso uses 1/7th of the available heap for it's LRU. But you can calculate what size you want by using the devices memory class.

int memClass = ((ActivityManager) mApplicationContext
            .getSystemService(Context.ACTIVITY_SERVICE))
            .getLargeMemoryClass();
int cacheSize = 1024 * 1024 * memClass / 4;
Good Luck

share|improve this answer
edited Oct 31 at 15:04

answered Oct 30 at 22:16

Thanks for this answer. How would you go about caching the next picture to be displayed? Let's say you are showing pictures from a gallery, how can you always cache the next picture to be displayed to avoid loading time?