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

更多相关文章

  1. Android:控件属性
  2. Android(安卓)EditText属性
  3. EditText中的几个常用属性
  4. android中控件的大部分属性解释
  5. Android(安卓)FrameLayout的:layout_marginTop属性失效的问题
  6. AdapterViewFlipper
  7. Android(安卓)资源文件中@、@android:type、@*、?、@+含义和区别
  8. Android中TextView内容过长加省略号
  9. Android(安卓)Launcher3主菜单背景改为黑色

随机推荐

  1. Android 设置背景色或者主题。
  2. 【转】Android之大话设计模式与企业级开
  3. ImageButton 和ImageWell 样式的浅析
  4. Android(安卓)Toolbar详解-实现Material
  5. Android EditText 限制输入的字数
  6. Android内核的编译
  7. Activity&Fragment生命周期详解
  8. 一界面相关知识
  9. Android .9图
  10. android 学习笔记 Android SDK 中重要的