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上写很多代码
本文介绍如何通过修改Android项目的styles.xml文件来定制应用的主题样式。包括创建无标题栏及全屏显示的效果,并在AndroidManifest.xml中配置不同的主题以实现更灵活的界面设计。
449

被折叠的 条评论
为什么被折叠?



