mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Merge pull request #3544 from Bnyro/master
Fix black bar on displays with cutout/notch
This commit is contained in:
commit
bbdb77e479
@ -20,6 +20,13 @@ object WindowHelper {
|
|||||||
|
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, !isFullscreen)
|
WindowCompat.setDecorFitsSystemWindows(window, !isFullscreen)
|
||||||
|
|
||||||
|
val layoutNoLimitsFlag = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
|
||||||
|
if (isFullscreen) {
|
||||||
|
window.setFlags(layoutNoLimitsFlag, layoutNoLimitsFlag)
|
||||||
|
} else {
|
||||||
|
window.clearFlags(layoutNoLimitsFlag)
|
||||||
|
}
|
||||||
|
|
||||||
// Show the system bars when it is not fullscreen and hide them when it is fullscreen
|
// Show the system bars when it is not fullscreen and hide them when it is fullscreen
|
||||||
// System bars means status bar and the navigation bar
|
// System bars means status bar and the navigation bar
|
||||||
// See: https://developer.android.com/training/system-ui/immersive#kotlin
|
// See: https://developer.android.com/training/system-ui/immersive#kotlin
|
||||||
|
Loading…
Reference in New Issue
Block a user