![](/img/trans.png)
[英]Change TextView color in Clicked and unClicked State using style.xml
[英]Can't change the Actionbar color when using the Style.XML (Holo Theme)
嗨,我很久以來一直在嘗試使用Android Studio在一個非常簡單的基本程序中更改操作欄顏色,但沒有成功。 我正在使用我的Samsung Galaxy S4進行測試。 怎么了?
我的清單包含以下行:android:theme =“ @ style / AppTheme”
而Style.xml就是這樣的:
**<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light">
<!-- Customize your theme here. -->
</style>
<style name="MyActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">#ff0000</item>
</style>**
像這樣更改清單中的名稱
@style/AppTheme to @style/MyActionBar
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.