Hide button/bar at bottom
Monkey Targets Forums/Android/Hide button/bar at bottom
| ||
Hi! How can I disable this button/bar at the bottom? ![]() |
| ||
What version of Android are you running? In v4.4 you can set the game to run in Immersive Full-Screen Mode: https://developer.android.com/training/system-ui/immersive.html You can just change the manifest so you need to add the code yourself within the Mojo Android files. |
| ||
Yes, it's Android v4.4.3. I can't manage that with your explanation, I have no experience in 'native code' and android things... sorry... Thats actually the reason why i'm using monkey... to get these thing out of the way :/ Can you tell me the solution more detailed, please? |
| ||
Maybe the following 2 topics help: - Immersive support for Android games - Getting rid of the three dots? |
| ||
Now it works. I just have set in the manifest 'android:targetSdkVersion' to '19'. That's it! Thanks to all! |
| ||
Hmm, still stump after reading this through. I tried setting it in the manifest to 19 and the soft button still shows? I am using nexus 5 if it makes any difference. |
| ||
I have a module for that :) https://github.com/sygem/fullscreen I also have a Nexus 5, running Lollipop, and this module enables the immersive fullscreen mode. |
| ||
sygem, it's brilliant! |
| ||
Thanks Sygem - do you mind if I add this to Diddy? [Edit: Added it to Diddy with Sygem credited and the MIT license] |
| ||
Just to let you know that the FullScreen module crashes on Android 2.3.3 - 2.3.7 with java.lang.NoClassDefFoundError:java.lang.NoClassDefFoundError: com.therevillsgames.csusatripeaks.NativeFullScreen$2$1 at com.therevillsgames.csusatripeaks.NativeFullScreen$2.run(MonkeyGame.java:3484) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3691) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670) at dalvik.system.NativeStart.main(Native Method) Line 3484: decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { I've decided to stop supporting 2.3 anyway now, but thought I would let you know. |
| ||
@therevills, what minimum version are you going to support? |
| ||
Anything above 3 I think would be okay, according to my game stats less than 6% of my users have less than 3. |
| ||
I forgot to change the version number in my last update to Google Play, so quite a few users running <3 tried playing the game and crashed :( I've added a small fix to the NativeScreen to stop it crashing on < 3. Its just a fail fast if the build is less and API 11 (3). public NativeFullScreen() { if (Build.VERSION.SDK_INT < 11) { return; } BBAndroidGame.AndroidGame().AddActivityDelegate(this); BBAndroidGame.AndroidGame().GetActivity().runOnUiThread(new Runnable() { public void run() { mHandler = new Handler(); View decorView = BBAndroidGame.AndroidGame().GetActivity().getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { @Override public void onSystemUiVisibilityChange(int visibility) { // Note that system bars will only be "visible" if none of the // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags are set. if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { // nothing to do? } else { if (isFullScreen) { mHandler.removeCallbacks(mHider); mHandler.postDelayed(mHider,2500); } } } }); } }); } |