Hi Boxers! This will be a simple and short tutorial to make your android game go fullscreen so that it hides status and navigation bar and you don't have problems of different screen sizes. EXAMPLE: Let's Start... 1. Export your game from BB to android. 2. Open Eclipse->File->Import and then select your exported game folder. 3. Next up, Go to this Directory in your Project Explorer com.yourgamename.blahblah->src->org.cocos2dx.lib->Cocos2dxActivity.java Double click and open the .java file. 4. Now search for this line of code in the editor. Code: setContentView(framelayout); HIGHLIGHTED IN THE IMAGE IS THE CODE YOU SHOULD LOOK FOR 5. Now just above the line we found, Code: // Set framelayout as the content view[/COLOR] setContentView(framelayout); you need to paste this code. Code: getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); ONE LAST THING, You have done the code work. Now its time to import 'View' in your code. If you don't, android won't be able to understand what you entered the fullscreen code for. Its super simple. Just where you have entered the code for fullscreen, there are many View methods in it. Example : View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN So just put your mouse over on View and a popup should come and select import View. OR ----------------------- IF YOU HAVE ALREADY IMPORTED "VIEW" by using the popup, YOU DON'T NEED TO FOLLOW THIS METHOD -----------------------SCROLL TO THE TOP OF THE .java FILE and there you'll see many imported methods. Just in the middle, put this line Code: import android.view.View; And you're done. That's it! Your game will now be fullscreen! Hit like if my tutorial worked. Ask any question if got a problem.
I am sorry, here is a better guide https://www.buildbox.com/forum/inde...uildbox-android-game-in-fullscreen-mode.6058/
i don't understand what all the need is for all this, every game i have made and run on android runs at full screen, without doing all this. Oh well,
I don't think it runs on fullscreen. Have you tried playing your game on a phone with on-screen buttons? The whole game window shift upwards. If you haven't yet made your game fullscreen that would cause a bad impression on users.
Thank you nayamamarshe, it worked like a charm (and I was using android studio) It really bugged me that the default export had onscreen navigation. The BuildBox team should really add a checkbox for fullscreen android export or just make it default.