用黑暗动作条编辑Holo Light

时间:2013-07-18 17:33:46

标签: android android-layout android-theme

我喜欢全息灯主题,但想稍微改变颜色。所以,我想将操作栏上的背景从黑色更改为橙​​色。我该怎么做呢?

1 个答案:

答案 0 :(得分:0)

您可以创建可添加到主题中的自定义样式。

<?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>

相关问题