diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index fa9f26286..abaa96355 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -555,8 +555,8 @@ class PhotoFragment : ViewPagerFragment() { private fun getExtendedDetailsY(height: Int): Float { val smallMargin = resources.getDimension(R.dimen.small_margin) - val fullscreenOffset = context!!.navigationBarHeight.toFloat() - smallMargin + val fullscreenOffset = smallMargin + if (isFullscreen) 0 else context!!.navigationBarHeight val actionsHeight = if (context!!.config.bottomActions && !isFullscreen) resources.getDimension(R.dimen.bottom_actions_height) else 0f - return context!!.usableScreenSize.y - height - actionsHeight + if (isFullscreen) fullscreenOffset else -smallMargin + return context!!.realScreenSize.y - height - actionsHeight - fullscreenOffset } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index 2c6927ea9..f9c53aac5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -627,8 +627,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S private fun getExtendedDetailsY(height: Int): Float { val smallMargin = resources.getDimension(R.dimen.small_margin) - val timeHolderHeight = mTimeHolder!!.height - context!!.navigationBarHeight.toFloat() - val fullscreenOffset = context!!.navigationBarHeight.toFloat() - smallMargin - return context!!.usableScreenSize.y - height + if (mIsFullscreen) fullscreenOffset else -(timeHolderHeight + smallMargin) + val fullscreenOffset = smallMargin + if (mIsFullscreen) 0 else mTimeHolder!!.height + return context!!.realScreenSize.y.toFloat() - height - fullscreenOffset } }