mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 16:28:01 +01:00
use Glide for loading non-animating gifs
This commit is contained in:
parent
327e18f3e2
commit
129858119d
1 changed files with 16 additions and 12 deletions
|
@ -148,6 +148,7 @@ fun Activity.loadImage(path: String, target: MySquareImageView, horizontalScroll
|
||||||
loadJpg(path, target, cropThumbnails)
|
loadJpg(path, target, cropThumbnails)
|
||||||
}
|
}
|
||||||
} else if (path.isGif()) {
|
} else if (path.isGif()) {
|
||||||
|
if (animateGifs) {
|
||||||
try {
|
try {
|
||||||
val gifDrawable = GifDrawable(path)
|
val gifDrawable = GifDrawable(path)
|
||||||
target.setImageDrawable(gifDrawable)
|
target.setImageDrawable(gifDrawable)
|
||||||
|
@ -163,6 +164,9 @@ fun Activity.loadImage(path: String, target: MySquareImageView, horizontalScroll
|
||||||
} catch (e: OutOfMemoryError) {
|
} catch (e: OutOfMemoryError) {
|
||||||
loadJpg(path, target, cropThumbnails)
|
loadJpg(path, target, cropThumbnails)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
loadJpg(path, target, cropThumbnails)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue