Skip to content

rKaiProgrammer/GIFWithGlideExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

011e6b9 · Sep 2, 2022

History

6 Commits
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022
Sep 2, 2022

Repository files navigation

GIFWithGlideExample

A simple example of loading GIF with Glide for a question from Stackoverflow

Preview:


 

AndroidManifest.xml:

add internet permission

<uses-permission android:name="android.permission.INTERNET" />

 

build.gradle(:app):

add Glide Library.

implementation 'com.github.bumptech.glide:glide:4.12.0'

 

activity_main.xml:

add an ImageView

<ImageView
    android:id="@+id/imageView"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

 

MainActivity.kt:

load GIF into imageView

 val url = "https://media.giphy.com/media/3o7527pa7qs9kCG78A/giphy.gif"
 Glide.with(this)
     .load(url)
     .into(imageView)

About

A simple example of loading GIF with Glide.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages