how to wrap 'Hide the Navigation Bar on 4.0 and .'

Monkey Targets Forums/Android/how to wrap 'Hide the Navigation Bar on 4.0 and .'

vmakar85(Posted 2014) [#1]
Hi, I was looking for a way to remove the status bar and the navigation bar and found the information on the site , but so far I can not imagine how and where do I add this code so that it would work, thanks in advance for your advice.


dragon(Posted 2014) [#2]
hm, the code is a example - you can add your own Java-function and put this code inside...
but this need api 4.0 - bad...


vmakar85(Posted 2014) [#3]
dragon thx.

ok . i add native file with code
import android.view.View;

class decore {
     Void setdecore() {
	    View decorView = getWindow().getDecorView();
		int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
		decorView.setSystemUiVisibility(uiOptions);

	}
 }

and get this error :
-compile:
    [javac] Compiling 3 source files to C:\MyProjects\MyGameProjects\myFontTest\myFontTest.build\android\bin\classes
    [javac] C:\MyProjects\MyGameProjects\myFontTest\myFontTest.build\android\src\com\monkeycoder\monkeygame\MonkeyGame.java:2757: error: cannot find symbol
    [javac] 	    View decorView = getWindow().getDecorView();
    [javac] 	                     ^
    [javac]   symbol:   method getWindow()
    [javac]   location: class decore
    [javac] C:\MyProjects\MyGameProjects\myFontTest\myFontTest.build\android\src\com\monkeycoder\monkeygame\MonkeyGame.java:2758: error: cannot find symbol
    [javac] 		int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
    [javac] 		                                                          ^
    [javac]   symbol:   variable SYSTEM_UI_FLAG_FULLSCREEN
    [javac]   location: class View
    [javac] Note: C:\MyProjects\MyGameProjects\myFontTest\myFontTest.build\android\src\com\monkeycoder\monkeygame\MonkeyGame.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors


any suggestions are welcome