0

I am trying to play with ExoPlayer in fullscreen in landscape mode.
So far I have done all things and thought this looks perfect until then I noticed something and want to explain with these image screens below.

This is Android 11 and currently, I have requested to use the entire screen for my layout and because of this, my demo app content is displayed under Statusbar and Navigationbar.
In Portrait mode, things look perfect and this little dot is the device camera in the middle of the screen but in landscape mode, this area is not used by my app. potraitlandscape


This is the `MxPlayer` screen and as you can see he covers the whole screen, including behind the camera or status bar area...
I want to achieve this.

mxplayer landscape

ShaRy
  • 59
  • 10

1 Answers1

0

Got my desired results...Display Cutout

In theme.xml set add this tag
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">always</item>

Or

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            window.addFlags(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS)
}

display cutout

ShaRy
  • 59
  • 10