如何更改操作栏的文本和背景属性? [英] How to change the Action bar text and background properties?

查看:123
本文介绍了如何更改操作栏的文本和背景属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我的风格的操作栏。我想改变的文本和背景属性。但所做的更改不会被应用到应用程序。我在哪里犯错?

这是我的style.xml

 <样式名称=AppTheme父=@安卓风格/ Theme.Holo.Light>
<项目名称=机器人:actionBarStyle> @风格/ MyActionBar< /项目>
< /风格>

<样式名称=MyActionBar父=@安卓风格/ Widget.Holo.Light.ActionBar>
<项目名称=机器人:windowBackground> @色/白< /项目>
<项目名称=机器人:背景> @色/白< /项目>
<项目名称=机器人:drawableBottom> @色/ actionbar_title_color< /项目>
<项目名称=机器人:TEXTSIZE> @扪/ actionbar_text_size< /项目>
<项目名称=机器人:文字颜色> @彩色/黑白LT; /项目>
< /风格>
 

解决方案

它的工作。这是我的错误。我正在改变中的值文件夹的样式。由于我工作的ICS,我应该已经在价值观-14文件夹改变了它。

Here is my style for the action bar. I would like to change the text and background properties. But the changes are not being applied to the app. Where am I making mistake?

This is my style.xml

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

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:windowBackground">@color/white</item>
<item name="android:background">@color/white</item>
<item name="android:drawableBottom">@color/actionbar_title_color</item>
<item name="android:textSize">@dimen/actionbar_text_size</item>
<item name="android:textColor">@color/black</item>    
</style>

解决方案

It worked. It was my mistake. I was changing the style in the values folder. Since I am working on ICS I should have changed it in values-14 folder.

这篇关于如何更改操作栏的文本和背景属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆