diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index fc492bfbf..ab28ce75c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -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) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/MyZoomableGifTextureView.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/MyZoomableGifTextureView.kt index eaeed9499..8c39e0a07 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/MyZoomableGifTextureView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/MyZoomableGifTextureView.kt @@ -50,6 +50,7 @@ class MyZoomableGifTextureView(context: Context, attrs: AttributeSet) : GifTextu return } + mSaveScale = 1f mGifWidth = gifWidth.toFloat() mGifHeight = gifHeight.toFloat() mScreenWidth = screenWidth.toFloat()