Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Updated 14 December 2016
What is Picasso Library?
A powerful image downloading and caching Library for Android. By its use Developer, to load an image in “android application” with one line of code, without worry about caching, transformation and threading an image to load.
Syntax:
where “this” is Activity object, “url” is image address URL (source) and “imageview” is ImageView (destination).
Picasso methods –
memoryPolicy(MemoryPolicy.NO_CACHE, MemoryPolicy.NO_STORE) ,
NO_CACHE- Skips memory cache lookup when processing a request.
NO_CACHE-
NO_STORE- Skips storing the final result into the memory cache. Useful for one-off requests to avoid evicting other bitmaps from the cache (it is needed, when loads an image only once).
NO_STORE-
Out of memory Exception : It happened when loading large size images . So, it solved by resizing the images. if we use resize(width, height) then the image is not resized as the aspect ratio. So we use a custom transform class using transform() method.
Example.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.