install android studio

How to use Glide Library for images in Android Studio

Glide:

Glide is term used in Android Studio in order to attain the purpose of loading the image in Android App  from server. Glide Library is provided by the Glide V4 to download and install in the project.

Glide used to loading several things like Video stills, Images, and Animated Gif’s  from Server side to app and also used from local directory to app. Glide Library has the ability to use a custom HttpUrlConnection based stack by default , Glide can also used Google’s Volley project or Square’s OkHttp library for connection purposes.

Glide has nature of smooth scrolling on any kind of list of images make it more unique and fast feature . Glide Library provides many features like cropping , Resizing , fetching and displaying with its simple inbuilt functions.

Glide library is just like the Android image gallery library which is used to store/download the image in android device gallery .

A simple definition of Glide used in coding purpose which allows user to make request in single line :

Glide.with(fragment)
    .load(url)
    .into(imageView);

To embed Glide Library and to use Glide in your project , You have to follow below steps in your project.

1. Add Dependency :

To download Glide Library automatically , we need to add dependency for  Glide in build.gradle file of the project .

compile 'com.github.bumptech.glide:glide:3.7.0'

2. Glide Api :

Add Glide API code where the image is going to be loaded in Android App. In my project , Image have to  load in recycler view so I put the API code in Adapter file shown as :

For doing more with Glide like cropping , thumbnails, Resizing etc. Then click >> More with Glide


This is all about the Glide Library . If you get any problem related to this , tell us in Comment section.

About the author

Generic Bytes

Hi! we are from Generic Bytes an aspiring bloggers with an obsession of things tech.This blog is dedicated to people who want to learn the technology.

View all posts

Leave a Reply

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