I am using Monogame to create a small Android game. I am trying to draw a sprite to the Android screen but it seems to have a padding of some pixels. The same game works fine on desktop.
How can I remove the padding? The graphic itself has no borders etc; the problem is also reproducible with any other sprite.
I have created a new project in VS2019 with the Monogame templates for VS2017 and tried to reproduce this behavior in a new project.
It seems that the problem has something to do with the notch of my emulator. In an emulator without a notch the problem seems to be non existent. I found this thread on the Monogame community but it hasn't got any answers.
My source code looks in its simplest form now as follows:
private Texture2D _texture;
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
_texture = Content.Load<Texture2D>("BasicTV");
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
spriteBatch.Draw(_texture, Vector2.Zero, Color.White);
spriteBatch.End();
base.Draw(gameTime);
}
The result of this code is this:
The Game is compiled for Android 8.1 and I use the Monogame framework 3.7.1.