mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Keep space for the status bar in player
This commit is contained in:
parent
8431716a14
commit
3da6b0678a
@ -202,10 +202,6 @@ internal class CustomExoPlayerView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hideController() {
|
override fun hideController() {
|
||||||
if (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
|
||||||
// hide all the navigation bars that potentially could have been reopened manually by the user
|
|
||||||
(context as? MainActivity)?.windowHelper?.setFullscreen()
|
|
||||||
}
|
|
||||||
// remove the callback to hide the controller
|
// remove the callback to hide the controller
|
||||||
handler.removeCallbacks(hideControllerRunnable)
|
handler.removeCallbacks(hideControllerRunnable)
|
||||||
super.hideController()
|
super.hideController()
|
||||||
@ -578,10 +574,10 @@ internal class CustomExoPlayerView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
listOf(binding.topBar, binding.bottomBar).forEach {
|
listOf(binding.topBar, binding.bottomBar).forEach {
|
||||||
val params = it.layoutParams as MarginLayoutParams
|
it.layoutParams = (it.layoutParams as MarginLayoutParams).apply {
|
||||||
params.marginStart = newMargin
|
marginStart = newMargin
|
||||||
params.marginEnd = newMargin
|
marginEnd = newMargin
|
||||||
it.layoutParams = params
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -676,6 +672,6 @@ internal class CustomExoPlayerView(
|
|||||||
companion object {
|
companion object {
|
||||||
private const val SUBTITLE_BOTTOM_PADDING_FRACTION = 0.158f
|
private const val SUBTITLE_BOTTOM_PADDING_FRACTION = 0.158f
|
||||||
private const val ANIMATION_DURATION = 100L
|
private const val ANIMATION_DURATION = 100L
|
||||||
private val LANDSCAPE_MARGIN_HORIZONTAL = (30).toPixel().toInt()
|
private val LANDSCAPE_MARGIN_HORIZONTAL = (20).toPixel().toInt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingHorizontal="5dp"
|
android:paddingHorizontal="5dp"
|
||||||
android:paddingTop="5dp" >
|
android:paddingTop="25dp" >
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user