小编use*_*263的帖子

如何在 Android 应用代码中隐藏导航栏

我将此代码添加到我的应用程序中;

View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
Run Code Online (Sandbox Code Playgroud)

但是代码迫使我将“SuppressLint NewApi 添加到 MainActivity”。另外还有一个关于“View.SYSTEM_UI_FLAG_FULLSCREEN”的错误。代码说“CHANGE TO....”所以我不知道我必须做什么。

请帮助我。非常感谢。

navigation android hide tablet adk

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

adk ×1

android ×1

hide ×1

navigation ×1

tablet ×1