mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-25 07:51:26 +01:00
fix the video time holder right margin at landscape video fragment
This commit is contained in:
parent
e9cbf444e1
commit
494745c10f
@ -410,12 +410,20 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initTimeHolder() {
|
private fun initTimeHolder() {
|
||||||
var bottomMargin = context!!.navigationBarHeight
|
var right = 0
|
||||||
|
var bottom = context!!.navigationBarHeight
|
||||||
if (mConfig.bottomActions) {
|
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)
|
mTimeHolder.beInvisibleIf(mIsFullscreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user