mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
fix the video time holder right margin at landscape video fragment
This commit is contained in:
parent
e9cbf444e1
commit
494745c10f
1 changed files with 11 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue