我将此代码添加到我的应用程序中;
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....”所以我不知道我必须做什么。
请帮助我。非常感谢。