android - Loading large images using Picasso -


im trying load large images using picasso

public static final int max_width= 500; public static final int max_height= 500;   picasso.with(imageview.getcontext())                 .load(utils.imagepath(list.get(position).getimage()))                 .resize(max_width,max_height)                 .onlyscaledown()                 .memorypolicy(memorypolicy.no_cache, memorypolicy.no_store)                 .into(imageview); 

but i'm getting fatal exception: java.lang.outofmemoryerror above code, images i'm trying load images below

enter image description here

should resize image backend or there can avoid this? appreciated.

having in adapter (seems be), image load can call many times, because of adapter multiple bindviews.

so sure

.memorypolicy(memorypolicy.no_cache, memorypolicy.no_store) 

?

you'd better define memory policy, maybe short memory size, or short timeout if don't want store data.


Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -