fixing some GIF zooming glitches

This commit is contained in:
tibbi 2019-01-23 13:42:44 +01:00
parent b6ce759370
commit e5796be852
2 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,7 @@ class PhotoFragment : ViewPagerFragment() {
// avoid GIFs being skewed, played in wrong aspect ratio
if (mMedium.isGIF()) {
mView.onGlobalLayout {
measureScreen()
Handler().postDelayed({
loadGif()
}, 50)

View File

@ -50,6 +50,7 @@ class MyZoomableGifTextureView(context: Context, attrs: AttributeSet) : GifTextu
return
}
mSaveScale = 1f
mGifWidth = gifWidth.toFloat()
mGifHeight = gifHeight.toFloat()
mScreenWidth = screenWidth.toFloat()