gpt4 book ai didi

android - 从 native android 应用程序中删除系统菜单栏

转载 作者:行者123 更新时间:2023-11-29 20:03:15 27 4
gpt4 key购买 nike

我的问题很简单,一直找不到解决办法。菜单栏在我的应用程序中非常烦人,我希望有办法将其删除。 enter image description here

最佳答案

查看Hiding the Navigation Bar我发现了这个:

You can hide the navigation bar on Android 4.0 and higher using the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag. This snippet hides both the navigation bar and the status bar:

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);

我不知道这是否正是您要找的,但您可以测试一下。

关于android - 从 native android 应用程序中删除系统菜单栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35977845/

27 4 0