I can’t reproduce this with the devices I have for testing, but I noticed that an options button appears next to the switch focus button on my Xperia Z’s on-screen controls. Since the game doesn’t have any options, I was wondering how I can block this entirely?
I’ve tried searching around google, the android SDK and stack overflow, but the terminology makes it difficult to filter out what is relevant. I can’t work out if this is classed as the action bar, menu bar, or something else.
The affected devices (both Moto Droids, but different models) have hardware (not on-screen) controls, but most devices I have used for testing default to using a long press on the home button or switch focus button to access the options instead of requiring an on-screen control.
I’ll keep digging, but if anybody already has a solution to this it would be appreciated.
Ok, so I tried various code fixes and nothing seemed to work. Eventually I found a blog post that gave the reason the menu bar appears, and it turns out the fix is to set the target android platform to 14 (keeping the min version at it’s original setting of 10 means the game should still work on older copies of Android).
I’m not sure what the settings are for the example monogame project but that should sort it.
1 weird thing I found in testing was that on a factory reset HTC device i have, the old settings show the menu bar but the games resolution adapts to that fine. For some reason the moto droid phones the players that contacted me were using, the resolution didn’t adapt to the menu bar.
Hi @friendlytoaster, I’m trying to hide the system bar using your code block, but an error popped up:
Error CS0120: An object reference is required for the non-static field, method, or property ‘Android.Views.Window.DecorView.get’ (CS0120)
Which object reference should I use?
Also Android.Views.SystemUiFlags does not contain a definition for ImmersiveSticky – my game project targets Android 4.2 and above though. I wonder if there is a way to use ImmersiveSticky in my game for Android 4.4 and above?
Well, this solution hides the navigation bar, but if you touch the screen again, it is back, and that touch event is actually not being given to your app/game at all. So now you have to touch everything twice:
you hide the nav bar
first tap gives back the nav bar
second tap with the nav bar already on will actually do what it needs to do
Anyboday has any working solution? Starting to implement an Android Monogame, basically this is the first thing you need, full screen without any nav/status/action bars …