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"
/>