Android Zoomable PhotoView With Glide

The following library are used

build.gradle (Project)

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

build.gradle (Module)

// https://github.com/bumptech/glide/releases
implementation 'com.github.bumptech.glide:glide:4.7.1'
kapt 'com.github.bumptech.glide:compiler:4.7.1'

// https://github.com/chrisbanes/PhotoView/releases
implementation 'com.github.chrisbanes:PhotoView:2.0.0'

Code

// imageResource can be filepath or URLGlide.with(this)        .load(imageResource)        .into(photoView)

Layout

<com.github.chrisbanes.photoview.PhotoView
    android:id="@+id/photoView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.