What is glide?
Library used to download the image in android app.
1. fast and efficient
2. Use less memory and disk space.
3. Very easy to implement.
4. support animated Gif file
5. Using in the list is very efficient.
6. In the latest version glide 3.7.0 fix the memory leak for gif files
7. Fix issue in releasing the memory while calling clear memory.
8. Having different method for clearing diskcache and also separate method to set.
9. Also we can also increase Glide’s Image Quality (builder.setDecodeFormat(DecodeFormat.PREFER_ARGB_8888))
10. Having many options like loading images from resources, file and from Uri.
11. the clarity of the image while comparing to picasso, Gilde have more clarity of image and also memory utilisation is very low.
12. Glide loads an image to memory and do the caching is better than Picasso which let an image loaded far faster
13. Automatic job cancellation in lists where views are re-used.
Below methods are very useful while comparing to other image downloading library.
- In the passed Google Developer Summit Thailand, Google introduced us an Image Loader Library for Android developed by bumptech named Glide as a library that recommended by Google,
- Must say that it looks 90% similar to Picasso
Import to project
Both Picasso and Glide are on jcenter. You can simply import it to your project with dependency like this:
Please don’t forget to import support-v4 to your project like above as well.
Although it looks quite the same but in details Glide is designed far better since with doesn’t accept only Context but also Activity and Fragment. Context will be automatically extracted from those things you throw in.
A lmost all the same things just like Picasso can do with the same style of coding for example
Image Resizing :
Placeholder and Error image:
Difference image loader’s: