0
我喜歡holo light主題,但想要稍微改變顏色。所以,我想將操作欄上的背景從黑色更改爲橙色。我會如何去做這件事?編輯Holo Light與黑色動作條
我喜歡holo light主題,但想要稍微改變顏色。所以,我想將操作欄上的背景從黑色更改爲橙色。我會如何去做這件事?編輯Holo Light與黑色動作條
您可以創建可添加到主題的自定義樣式。
<?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>
的
可能重複[如何更改使用XML的ActionBarActivity的動作條的背景顏色?(http://stackoverflow.com/questions/8024706/how-do-i-變化的背景色的最-動作條-的-AN-actionbaractivity-US) – mmBs