android之4.0的系統主題style修改android:Theme.Holo.Light


1.修改主界面背景顏色

轉自http://www.dewen.io/q/9466

在AndroidMenifest.xml application 屬性設置時不使用系統的
android:theme="@android:style/Theme.Holo", 而是自定義的           android:theme="@style/customtitlebar"
在values 中style.xml添加屬性


<style name="customtitlebar" parent="android:Theme.Holo.Light">
        <item name="android:actionBarStyle"> @style/MyActionBar</item>
    </style>


    <style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
        <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
    </style>


    <style name="MyTheme.ActionBar.TitleTextStyle" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Title">
        <item name="android:textColor">@color/white</item>
    </style>
然後在color.xml中添加white屬性值, 
    <color name="white">#ffffffff</color>
即可,以上是我修改4.0設置所得。


2.Theme.LightTheme.Dark的區別

http://blog.csdn.net/zmyde2010/article/details/7250962

發佈了83 篇原創文章 · 獲贊 17 · 訪問量 103萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章