adding some GIF and SVG improvements
This commit is contained in:
parent
b51a4d14cc
commit
8b735f36d7
1 changed files with 10 additions and 6 deletions
|
@ -374,8 +374,10 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
|
||||
mView.apply {
|
||||
gestures_view.beGone()
|
||||
gif_view.setInputSource(source)
|
||||
gif_view_frame.beVisible()
|
||||
ensureBackgroundThread {
|
||||
gif_view.setInputSource(source)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
loadBitmap()
|
||||
|
@ -385,11 +387,13 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
|
||||
private fun loadSVG() {
|
||||
Glide.with(context!!)
|
||||
.`as`(PictureDrawable::class.java)
|
||||
.listener(SvgSoftwareLayerSetter())
|
||||
.load(mMedium.path)
|
||||
.into(mView.gestures_view)
|
||||
if (context != null) {
|
||||
Glide.with(context!!)
|
||||
.`as`(PictureDrawable::class.java)
|
||||
.listener(SvgSoftwareLayerSetter())
|
||||
.load(mMedium.path)
|
||||
.into(mView.gestures_view)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadBitmap(addZoomableView: Boolean = true) {
|
||||
|
|
Loading…
Reference in a new issue