REF:http://www.cnblogs.com/and_he/archive/2011/06/01/2067106.html
学习了后发现还可以这样用styles.xml:
1.sytles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<style name="NoTitle">
<item name="android:windowNoTitle">true</item>
</style>
<style name="NoTitle.FullScreen">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
2.AndoridManifest.xml
在Application 标签下:
a.无标题栏而且全屏
android:theme="@style/NoTitle.FullScreen" >
b.只是隐藏标题栏:
android:theme="@style/NoTitle" >
优点:前台和后台分工明确,不用再oncreate上写很多代码