在我们的实际的开发过程中我们可能需要使用没有titlebar的主题,我们可以在配置文件中,修改application的theme达到效果,也可以在自己的style文件里面的appTheme里面进行继承相应的主题,达到效果
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" >
这个时候我们也可以修改自己style里面的apptheme
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:windowNoTitle">true</item>
</style>
这里有一点需要注意,在android自己的theme里面,设置item的时候是这个样子的
<style name="Theme.Holo.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
他的item里面没有android:
而我们自己的style文件中就要添加android:了,不然的话他会说找不到该配置