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万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章