only change system ui visibility when we have focus in an attempt to match the docs more closely

This commit is contained in:
Ellpeck 2020-06-28 18:42:17 +02:00
parent 58bb137a43
commit c8adf71dc1

View file

@ -70,7 +70,8 @@ namespace Android {
public override void OnWindowFocusChanged(bool hasFocus) {
base.OnWindowFocusChanged(hasFocus);
// hide the status bar
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (ImmersiveSticky | LayoutStable | LayoutHideNavigation | LayoutFullscreen | HideNavigation | Fullscreen);
if (hasFocus)
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (ImmersiveSticky | LayoutStable | LayoutHideNavigation | LayoutFullscreen | HideNavigation | Fullscreen);
}
}