Fix the extra padding for the vertical plaeyr

This commit is contained in:
Bnyro 2023-01-20 19:39:51 +01:00
parent 3cef897e89
commit e4cbb2b90c
2 changed files with 11 additions and 1 deletions

View File

@ -591,6 +591,16 @@ internal class CustomExoPlayerView(
it.layoutParams = params
}
// add padding to the top bar to not overlap the status bar
binding.topBar.let {
setPadding(
it.paddingLeft,
(if (newConfig?.orientation == Configuration.ORIENTATION_LANDSCAPE) 25 else 5).toPixel().toInt(),
it.paddingRight,
it.paddingBottom
)
}
// don't add extra padding if there's no cutout
if ((context as? MainActivity)?.windowHelper?.hasCutout() == false) return

View File

@ -17,7 +17,7 @@
android:animateLayoutChanges="true"
android:orientation="vertical"
android:paddingHorizontal="5dp"
android:paddingTop="25dp" >
android:paddingTop="5dp" >
<LinearLayout
android:layout_width="match_parent"