程序启动后左上角的title能不能不显示,该如何处理
程序启动后左上角的title能不能不显示
在mainfest.xml中
有这样一段:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="app的名字" >
这样在程序运行的时候左上角就会显示title。我现在的问题是不想显示这个,但是如果把“app的名字”设为空,则上面有一行空行,如果直接删掉这行,则显示主程序类的名字。请问有办法隐藏这个title,并且不占空间吗?
------解决方案--------------------
不知道弄明白你的意思没,在mainfest.xml中在启动的activity的android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
------解决方案--------------------
setcontentview之前调用这一句
requestWindowFeature(Window.FEATURE_NO_TITLE);
------解决方案--------------------
在mainfest.xml中,在你不需要显示title的activity里面,增加配置:
android:theme="@android:style/Theme.Black.NoTitleBar"
------解决方案--------------------
android:theme="@android:style/Theme.Light.NoTitleBar"
在mainfest.xml中
有这样一段:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="app的名字" >
这样在程序运行的时候左上角就会显示title。我现在的问题是不想显示这个,但是如果把“app的名字”设为空,则上面有一行空行,如果直接删掉这行,则显示主程序类的名字。请问有办法隐藏这个title,并且不占空间吗?
------解决方案--------------------
不知道弄明白你的意思没,在mainfest.xml中在启动的activity的android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
------解决方案--------------------
setcontentview之前调用这一句
requestWindowFeature(Window.FEATURE_NO_TITLE);
------解决方案--------------------
在mainfest.xml中,在你不需要显示title的activity里面,增加配置:
android:theme="@android:style/Theme.Black.NoTitleBar"
------解决方案--------------------
android:theme="@android:style/Theme.Light.NoTitleBar"