I have been using Volley NetworkImageView and Picasso to load images in Android. This relationship ended when I discovered Glide and fell in love.
Glide is an open source media management framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
Glide is specifically designed not only to be easy to use, but also to make scrolling lists of images as smooth and pleasant to use as possible. To reduce stuttery scrolling in lists caused by garbage collections due to Bitmap allocations, Glide uses reference counting behind the scenes to track and reuse Bitmap objects. To maximize the number of Bitmaps that are re-used, Glide includes a Bitmap pool capable of pooling arbitrary sizes of Bitmaps.
Glide’s interface is still simple and easy to use.
1. Add gradle plugin
2. Simple view Demo
To display an image, video still, or animated GIF in a view, you still need only one line.
3. RecyclerView Demo
The code below demonstrates on how I use Glide in a custom listView that extends
- Image resizing:
- Center Cropping:
- Loading Animation to an ImageView. Use this feature carefully since GIFs use a lot of memory.
- Generate thumbnails:
I have used Picasso and NetworkImageView in most of my projects, I must confess that I am in love with Glide. I have not been paid to endorse Glide. I am simply sharing my thoughts and experiences.