[老笔记]20151102 android应用中去掉标题栏的方法
1.在代码里实现
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
写在setContentView()前面。
2.在清单文件(manifest.xml)里面实现
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
3.在style.xml文件里定义
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="notitle">
<item name="android:windowNoTitle">true</item>
</style>
</resources>
然后面manifest.xml中引用
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/notitle">
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果