Read More
Read now

How to use the Glide image loading library in android

Save

Glide is one of most used image loading library in the world for the android applications. This library provides the number of features. It’s syntax and mechanism looks like Picasso image loading library. But this is the difference from the Picasso on basis of the way how it downloads images, caches images and loads them into memory.

So in this blog, we will see some basic introduction and use of this library in our android application for loading images.

Introduction

Glide is the image library which is used for the loading the image in android app. The size of Glide image library is around 476KB and there is 2879 method count. Glide is on

Glide is on jcenter.  And we can simply import this library in our android project.

How to use

This library’s syntax is all most same with the Picasso library for the load the image in the Imageview.

Picasso: 

Glide: 

.skipMemoryCache(true) : we called this method for skip the memory cache. This means that Glide will not put the image in the memory cache. It’s important to understand, that this only affects the memory cache! Glide will still utilize the disk cache to avoid another network request.

.diskCacheStrategy(DiskCacheStrategy.NONE)) : There are four types of the DiskCacheStrategy which can be used, 
ALL: with both {@link #SOURCE} and {@link #RESULT}. */
NONE: /** Saves no data to cache. */
SOURCE: /** Saves just the original data to cache. */
RESULT: /** Saves the media item after all transformations to cache. */

Thanks for reading this blog, if you have any questions or problems ask in the comment section.

Happy Coding. Stay Super.

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home