Merge pull request #2779 from Bnyro/master

Fix the extra padding for the vertical plaeyr
This commit is contained in:
Bnyro 2023-01-20 19:40:09 +01:00 committed by GitHub
commit 7cee4b5c69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"