make bottom actions work well with extended details
This commit is contained in:
parent
3559147c98
commit
02ce6bd11b
2 changed files with 6 additions and 1 deletions
|
@ -431,6 +431,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
private fun getExtendedDetailsY(height: Int): Float {
|
private fun getExtendedDetailsY(height: Int): Float {
|
||||||
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||||
val fullscreenOffset = context!!.navigationBarHeight.toFloat() - smallMargin
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,6 +199,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
right += context!!.navigationBarWidth
|
right += context!!.navigationBarWidth
|
||||||
bottom += context!!.navigationBarHeight
|
bottom += context!!.navigationBarHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context!!.config.bottomActions) {
|
||||||
|
bottom += resources.getDimension(R.dimen.bottom_actions_height).toInt()
|
||||||
|
}
|
||||||
mTimeHolder!!.setPadding(left, top, right, bottom)
|
mTimeHolder!!.setPadding(left, top, right, bottom)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue