make bottom actions work well with extended details

This commit is contained in:
tibbi 2018-06-17 20:11:29 +02:00
parent 3559147c98
commit 02ce6bd11b
2 changed files with 6 additions and 1 deletions

View file

@ -431,6 +431,7 @@ class PhotoFragment : ViewPagerFragment() {
private fun getExtendedDetailsY(height: Int): Float {
val smallMargin = resources.getDimension(R.dimen.small_margin)
val fullscreenOffset = context!!.navigationBarHeight.toFloat() - smallMargin
return context!!.usableScreenSize.y - height + if (isFullscreen) fullscreenOffset else -smallMargin
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
}
}

View file

@ -199,6 +199,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
right += context!!.navigationBarWidth
bottom += context!!.navigationBarHeight
}
if (context!!.config.bottomActions) {
bottom += resources.getDimension(R.dimen.bottom_actions_height).toInt()
}
mTimeHolder!!.setPadding(left, top, right, bottom)
}