[英]Editing Holo Light with Dark Action Bar
I like the holo light theme, but want to change the colors around a bit. 我喜欢全息光的主题,但想稍微改变一下颜色。 So, I want to change the background on the action bar from black to orange.
因此,我想将操作栏上的背景从黑色更改为橙色。 How would I go about doing this?
我将如何去做呢?
You can create a custom style which you can add to your theme. 您可以创建自定义样式,可以将其添加到主题中。
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- the theme applied to the application or activity -->
<style name="MyActivityTheme" parent="@android:style/Theme.Holo.Light">
<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.Light.ActionBar">
<!-- Use a color attribute defined in colors.xml -->
<item name="android:background">@color/orange</item>
<!-- Or use a regular color code (This is orange)-->
<item name="android:background">#F3D3D</item>
</style>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.