1:单个activity里
onCreate()
{
super.onCreate();
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(xxx);//注意顺序
}
2:通过设置主题theme
<application android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar"
3:在style.xml里定义
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!--去掉标题title-->
<item name="android:windowNoTitle">true</item>
<!--禁止横屏竖屏的切换-->
<item name="android:configChanges">orientation|keyboardHidden|screenSize</item>
<!-- Customize your theme here. -->
</style>
<!--分割线1-->
<style name="line_f3">
<item name="android:background">#f3f3f3</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
</style>