我正在尝试显示在谷歌开发者页面中的这段代码,但没有成功。
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
// Remember that you should never show the action bar if the
// status bar is hidden, so hide that too if necessary.
ActionBar actionBar = getActionBar();
actionBar.hide();
我是否也应该在 list 文件中添加一些内容?
谢谢。
最佳答案
你可以用这样的代码隐藏你的操作栏。
ActionBar actionbar = getActionBar();
actionbar.hide();
或者如 M D 所述,您可以使用 NO Action Bar Theme 隐藏您的操作栏。
关于android - 为 Android > 4.1 隐藏 ActionBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27246624/