Load Images From The Internet For Your Android Application Using Glide.

Load Images From The Internet For Your Android Application Using Glide.

·

1 min read

Case-Scenario

  • Imagine That You Are Working On A Project Where You Need To Load Multiple Images Or May Be You Need To Load Image(s) From The Internet, In Those Case Glide Can Help You🥳.

What Is It?

  • Glide Is An Image Loading Framework For Android Which Is A Fast, Efficient && Open Source Project.

In Short: Glide: Image Loading Framework For Android.

When To Use:

  • In Case If You Are Trying To

    • Fetching
    • Decoding
    • Displaying Video Stills
    • Displaying Images
    • Displaying Animated GIF(s)

Then You Can Use Glide Without Any Worries😉

Setup Glide With Your Project

  • In Your build.gradle File Add These Dependencies In Order To Start Using Glide:
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
  • Before Proceeding To Kotlin File Make Sure That You Have Added ImageView In Your .XML File.

Now In Your Kotlin File :

Glide.with(this) //  this -> Context
         .asDrawable() // Image Type
         .load("URL of the image which you want to show from internet")     // URL Of The Image
         .into(imageView) // Loading In Image View Which Is In XML File.

And Congratulations You Have Implemented It Successfully; Experiment With Glide To Know More😉.

Well, That's All For Now🙌

Bye🤗