From 1b32d05e0500d624a2acaf55f560f84478d76b53 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 28 Jun 2020 19:32:57 +0200 Subject: [PATCH] fixed rendering under notches to actually not occur --- Android/Activity1.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Android/Activity1.cs b/Android/Activity1.cs index a23127b..445a4b8 100644 --- a/Android/Activity1.cs +++ b/Android/Activity1.cs @@ -53,7 +53,11 @@ namespace Android { this.game.GraphicsDeviceManager.PreferredBackBufferHeight = args.Bottom - args.Top; this.game.GraphicsDeviceManager.ApplyChanges(); }; - + + // don't render under notches + if (Build.VERSION.SdkInt >= BuildVersionCodes.P) + this.Window.Attributes.LayoutInDisplayCutoutMode = LayoutInDisplayCutoutMode.Never; + // total layout that is displayed this.mainView = new LinearLayout(this) {Orientation = Orientation.Vertical}; this.mainView.LayoutParameters = new LinearLayout.LayoutParams(MatchParent, MatchParent);