Android 标题栏移除
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2446373/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android title bar removal
提问by teepusink
Possible Duplicate:
What do I have to add to a layout to hide the titlebar?
可能的重复:
我必须向布局添加什么才能隐藏标题栏?
How do I remove the title below the battery, time bar from showing up?
如何删除电池下方的标题,时间条不显示?
Not sure the terminology for that bar, but on this picture it is the "Nested XML Layout" bar:
不确定该栏的术语,但在这张图片上它是“嵌套 XML 布局”栏:
回答by Erich Douglass
Add the android:theme
property to your AndroidManifest.xml:
将该android:theme
属性添加到您的 AndroidManifest.xml:
<application android:theme="@android:style/Theme.NoTitleBar">
回答by Chirag
Use this on in Java file before setContentView()
之前在 Java 文件中使用它 setContentView()
requestWindowFeature(Window.FEATURE_NO_TITLE);
Use this AndroidManifest file
使用这个 AndroidManifest 文件
android:theme="@android:style/Theme.NoTitleBar"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"