使用style改变标题栏背景
activity中指定theme
<activity android:name=".MainAct" android:theme="@style/test">
</activity>
test的style如下:
<style name="CustomTitleBackground">
<item name="android:background">#090999</item>
</style>
<style name="test" parent="android:Theme">
<item name="android:windowTitleSize">40dp</item>
<item name="android:windowTitleBackgroundStyle">@style/CustomTitleBackground</item>
</style>