我有什么要添加到布局隐藏标题栏? [英] What do I have to add to a layout to hide the titlebar?

查看:106
本文介绍了我有什么要添加到布局隐藏标题栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏我的应用程序中的一些我的观点的标题栏。我有什么添加到我想隐藏在标题栏的布局文件?你能提供一个例子吗?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆