xiaoyi's blog

网聚你我力量,网聚天下技术。

« JS类型转换 Android学习笔记之AndroidManifest.xml文件解析 »

去掉Android上的Title Bar

方法一:修改code

 

 

public void onCreate(Bundle savedInstanceState)函数体中加

 

this.requestWindowFeature(Window.FEATURE_NO_TITLE);

 

些方法明显能看到title bar显示了之后又消失了,给user的感觉不好。

 

 

方法二:修改AndroidManifest.xml

 

 

第一处: 好像修改这一处就可以了,不必要修改第二处的

 

<application

 

android:label="@string/app_name"

 

android:icon="@drawable/logo" android:theme="@android:style/Theme.NoTitleBar"

 

>

 

第二处:

 

 

<activity

 

android:label="@string/app_name"

 

android:name="MAndFileBrowser"

 

android:configChanges="keyboardHidden|orientation"

 

android:theme="@android:style/Theme.NoTitleBar"

 

>

 

 

方法三:修改style配置文件

 

 

第一处:res/values文件夹下创建一个xml文件

 

内容如下:

 

<?xmlversion="1.0" encoding="utf-8"?>

 

<resources>

 

<style name="NoTitle" parent="android:Theme">

 

<item name="android:windowNoTitle">true</item>

 

</style>

 

</resources>

 

 

第二处:AndroidManifest.xml

 

<activity

 

android:label="@string/app_name" android:name="MAndFileBrowser"

 

android:theme="@style/NoTitle"

 

>

Baidu一下: 去掉Android上的Title Bar
Google一下: 去掉Android上的Title Bar

  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Walle Build 91204 Code detection by Codefense

Copyright 2005-2009 www.SoHelp.Cn. Some Rights Reserved.辽ICP备07500712号.