我是
android编程的新手!
我想要像Hill Climb Racing这样的全屏图像(如下所示)
我想要像Hill Climb Racing这样的全屏图像(如下所示)
我尝试使用
requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
但它只是消失动作栏,我想消失动作栏和Android默认键栏(主页按钮,后面和另一个)
解决方法
如果你的目标是Android 4.0及更高版本
View decorView = getWindow().getDecorView(); // Hide both the navigation bar and the status bar. // SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher,but as // a general rule,you should design your app to hide the status bar whenever you // hide the navigation bar. int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN; decorView.setsystemUIVisibility(uiOptions);
请查看此developer site以获取更多详细信息