Glide, Image Loader Library for Android

post
By kioko on June 23rd In Android
glide

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_logo

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 RecyclerView

Glide Features

  1. Image resizing: .override(300,200);
  2. Center Cropping: .centerCrop();
  3. Loading Animation to an ImageView. Use this feature carefully since GIFs use a lot of memory.
  4. Generate thumbnails: .thumbnail();

Conclusion

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.

Happy Coding.

Leave a reply

Recent Posts

Recent Comments

Archives

Categories