[英]Hiding / disabling navigation bar on android 4.4.4
我正在为运行android 4.4.4的特定平板电脑开发应用程序。 不允许用户关闭应用程序。 我希望有一种方法可以完全隐藏或禁用导航栏,但是我似乎找不到解决方案。 我已经尝试使用全屏沉浸式使用中说明的方法,但是似乎没有任何效果。 有什么建议么?
您可以使用SYSTEM_UI_FLAG_HIDE_NAVIGATION标志隐藏导航栏。
试试这个代码
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);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.