我怎样才能改变操作栏API 15风格 [英] How can I change the style of action bar API 15
本文介绍了我怎样才能改变操作栏API 15风格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想改变我的行动吧的风格,所以我想改变下的操作栏由蓝色变为橙色线条的颜色,我该怎么办呢?
I want to change the style of my Action bar so I want to change the color of line under the action bar from Blue to Orange , how can I do that?
推荐答案
这是一个很好的教程的这里
There is a good tutorial here
您的自定义绘制创建一个新的样式
Create a new style with your custom 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>
这篇关于我怎样才能改变操作栏API 15风格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文