如何更改操作栏的文本和背景属性?属性、如何更改、背景、操作

2023-09-12 03:04:11 作者:◆◇纯情,男★

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

这是我的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.

 
精彩推荐
图片推荐