I am setting the PreferredBackBuffer to Window.ClientBounds in the Initialization step then applying the changes to the GraphicsDeviceManager.
However when I draw a texture on screen there will be blank bars where the image doesn’t get drawn on the left and right of the screen.
If I add +50 to the PreferredBackBufferWidth the problem gets fixed but this is a very bad solution obviously. I’m not sure why Window.ClientBounds width and height doesn’t return the real resolution of the device?
edit: so I checked my phone’s resolution and the height is wrong too.
OnePlus 7 resolution: 1080 x 2340 pixels
Resolution returned by ClientBounds = 1043 x 2260
edit2: solved the problem, have to add this to Activity.cs:
Window.Attributes.LayoutInDisplayCutoutMode = LayoutInDisplayCutoutMode.ShortEdges; Window.AddFlags(WindowManagerFlags.Fullscreen); Window.AddFlags(WindowManagerFlags.LayoutInOverscan);