diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt index 57ab7dcae..5e78802a8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt @@ -410,12 +410,20 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } private fun initTimeHolder() { - var bottomMargin = context!!.navigationBarHeight + var right = 0 + var bottom = context!!.navigationBarHeight if (mConfig.bottomActions) { - bottomMargin += resources.getDimension(R.dimen.bottom_actions_height).toInt() + bottom += resources.getDimension(R.dimen.bottom_actions_height).toInt() } - (mTimeHolder.layoutParams as RelativeLayout.LayoutParams).bottomMargin = bottomMargin + if (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE && activity?.hasNavBar() == true) { + right += activity!!.navigationBarWidth + } + + (mTimeHolder.layoutParams as RelativeLayout.LayoutParams).apply { + bottomMargin = bottom + rightMargin = right + } mTimeHolder.beInvisibleIf(mIsFullscreen) }