[英]Editing Holo Light with Dark Action Bar
我喜歡全息光的主題,但想稍微改變一下顏色。 因此,我想將操作欄上的背景從黑色更改為橙色。 我將如何去做呢?
您可以創建自定義樣式,可以將其添加到主題中。
<?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.