我有什么要添加到布局隐藏标题栏? [英] What do I have to add to a layout to hide the titlebar?
问题描述
我想隐藏我的应用程序中的一些我的观点的标题栏。我有什么添加到我想隐藏在标题栏的布局文件?你能提供一个例子吗?
I want to hide the titlebar of my app in some of my views. What do I have to add to the layout files I want to hide the titlebar in? Can you provide an example?
推荐答案
Do you mean you want the screen going from something similar to this to something similar to that?
如果这就是你想要的东西,让你的主题继承 Theme.NoTitleBar
或直接使用它。
你开活动
在AndroidManifest.xml标签应该somethig这样的:
If that's what you want, make your theme inherit Theme.NoTitleBar
or use it directly.
Your opening Activity
tag in the AndroidManifest.xml should look somethig like:
<activity android:name=".MyActivity"
android:theme="@android:style/Theme.NoTitleBar">
如果你只想隐藏标题,但保留标题栏,你可以用Sephy的建议。
If you only want to hide the title, but keep the title bar, you can go with Sephy's recommendations.
这篇关于我有什么要添加到布局隐藏标题栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!