Hello Nerds, Are you still facing lazy image loading or OutOfMemoryException using Universal image loader, Picasso, Glide or any other library? If Yes, then this tutorial will be very helpful for you. Fresco image loading library provides quick loading of images over any other library. It provides lots of customization features, like progressBarImage, placeholderImage, failureImage, retryImage, backgroundImage, roundAsCircle, watermark and much more. Some of the features are described below.
Features of Fresco Image Loading library:
1. For storing images, Asynchronous shared heap is used instead of Java heap. This will leave lots of free memory for other applications and reduces the risk of OutofMemory exception.
2. Not only to the center, but images can be cropped at any point.
3. Images can be resized.
4. JPEG images can be streamed, just like the web browser.
5. Reduces garbage collection.
6. Operations are in a parallel manner.
Steps to implement this library in your android application
Step1: Add dependency on a build.gradle file
// If your application supports Ice Cream Sandwich Android OS version(API level 14)
// For animated GIF images support
// For WebP support, including animated WebP
// For WebP support, without animations
// For basic application support
Step2: Create an application class and initialize the library in it.
Note: If not creating application class and need to use it directly in a single class, in that case just initialize the above code before setContentView method of that activity.