diff --git a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt index 36e1aad9c..2717298b7 100644 --- a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt +++ b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt @@ -202,10 +202,6 @@ internal class CustomExoPlayerView( } 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 handler.removeCallbacks(hideControllerRunnable) super.hideController() @@ -578,10 +574,10 @@ internal class CustomExoPlayerView( } listOf(binding.topBar, binding.bottomBar).forEach { - val params = it.layoutParams as MarginLayoutParams - params.marginStart = newMargin - params.marginEnd = newMargin - it.layoutParams = params + it.layoutParams = (it.layoutParams as MarginLayoutParams).apply { + marginStart = newMargin + marginEnd = newMargin + } } } @@ -676,6 +672,6 @@ internal class CustomExoPlayerView( companion object { private const val SUBTITLE_BOTTOM_PADDING_FRACTION = 0.158f private const val ANIMATION_DURATION = 100L - private val LANDSCAPE_MARGIN_HORIZONTAL = (30).toPixel().toInt() + private val LANDSCAPE_MARGIN_HORIZONTAL = (20).toPixel().toInt() } } diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml index a4fb1cced..71671e086 100644 --- a/app/src/main/res/layout/exo_styled_player_control_view.xml +++ b/app/src/main/res/layout/exo_styled_player_control_view.xml @@ -17,7 +17,7 @@ android:animateLayoutChanges="true" android:orientation="vertical" android:paddingHorizontal="5dp" - android:paddingTop="5dp" > + android:paddingTop="25dp" >