我想更改操作栏的样式,所以我想将操作栏下的线条颜色从蓝色更改为橙色,我该怎么做?
解决方法:
有一个很好的教程here
使用自定义drawable创建新样式
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- the theme applied to the application or activity -->
<style name="Theme.MyStyle" parent="@android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<!-- other activity and action bar styles here -->
</style>
<!-- style for the action bar backgrounds -->
<style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:background">@drawable/ab_background</item>
<item name="android:backgroundStacked">@drawable/ab_background</item>
<item name="android:backgroundSplit">@drawable/ab_split_background</item>
</style>
</resources>
然后在AndroidManifest.xml中添加自定义样式
<application
android:debuggable="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.MyStyle"
>
<activity ...>
<activity .../>
...
</application>