My game permanently disables the navigation bar but it reappears when an interstitial advert is shown, which would be ok but it then remains on the screen when the game resumes and gets in the users way. I’ve noticed on other peoples games it is hiding again as soon as the advert is shown.
Does anyone know how I resolve this?
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using Microsoft.Xna.Framework;
namespace My_Game
{
[Activity(
Label = “My Game”,
MainLauncher = true,
Icon = “@drawable/Icon”,
AlwaysRetainTaskState = true,
LaunchMode = LaunchMode.SingleInstance,
ScreenOrientation = ScreenOrientation.SensorLandscape,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize
)]
public class Activity1 : AndroidGameActivity
{
private Game1 _game;
private View _view;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
_game = new Game1();
_view = _game.Services.GetService(typeof(View)) as View;
RequestedOrientation = Android.Content.PM.ScreenOrientation.Landscape;
SystemUiFlags flags = SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen | SystemUiFlags.ImmersiveSticky | SystemUiFlags.Immersive; Window.DecorView.SystemUiVisibility = (StatusBarVisibility)flags; Immersive = true;
SetContentView(_view);
_game.Run();
}
}
}