From d72d905da749281bc42c47691834bec8494d2702 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 15 Jun 2020 17:08:14 +0200 Subject: [PATCH] possibly fix status bar visibility on some devices --- Android/Activity1.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Android/Activity1.cs b/Android/Activity1.cs index dd2c1da..6c1ebde 100644 --- a/Android/Activity1.cs +++ b/Android/Activity1.cs @@ -10,6 +10,7 @@ using Microsoft.Xna.Framework; using MLEM.Extensions; using MLEM.Misc; using TouchyTickets; +using static Android.Views.SystemUiFlags; using static Android.Views.ViewGroup.LayoutParams; using Uri = Android.Net.Uri; @@ -71,9 +72,9 @@ namespace Android { } public override void OnWindowFocusChanged(bool hasFocus) { - // hide the status bar - this.mainView.SystemUiVisibility = (StatusBarVisibility) (SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen | SystemUiFlags.ImmersiveSticky); base.OnWindowFocusChanged(hasFocus); + // hide the status bar + this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (ImmersiveSticky | LayoutStable | LayoutHideNavigation | LayoutFullscreen | HideNavigation | Fullscreen); } }