Android 更改操作栏文本颜色

Android 更改操作栏文本颜色,android,android-actionbar,textcolor,Android,Android Actionbar,Textcolor,我一直在论坛上阅读,尝试不同的技术来改变Android栏中的文本颜色,但我没有成功。当我将文本颜色设置为标题时,不会发生任何更改。有人能帮忙吗 Strings.xml 欢迎 设置 你好,世界! 滑块菜单打开 滑块菜单关闭 家 人 照片 社区 页 热门查询 @可抽出式/集成电路回家 @可抽出式/集成电路人员 @可绘制/集成电路照片 @可提取/集成电路社区 @可绘图/集成电路页 @可抽出式/集成电路什么是热的 项目图标 Color.xml #fff #3C536B #FFD34B #fff #

我一直在论坛上阅读,尝试不同的技术来改变Android栏中的文本颜色,但我没有成功。当我将文本颜色设置为标题时,不会发生任何更改。有人能帮忙吗

Strings.xml

欢迎
设置
你好,世界!
滑块菜单打开
滑块菜单关闭
家
人
照片
社区
页
热门查询
@可抽出式/集成电路回家
@可抽出式/集成电路人员
@可绘制/集成电路照片
@可提取/集成电路社区
@可绘图/集成电路页
@可抽出式/集成电路什么是热的
项目图标
Color.xml

#fff
#3C536B
#FFD34B
#fff
#626262
#c5c4c4
Styles.xml

@风格/动作风格
#FFFFFF
#FFFFFF
#3C536B
[简而言之:

具有讽刺意味的是,我最近自己解决了这个问题

简单地说,它的工作原理如下: 1) 您的应用程序[或活动]实现主主题/样式 2) 主主题实现了一个动作栏主题/样式 3) 动作栏主题/样式实现了文本外观主题/样式[决定颜色]

现有代码的问题在于操作栏主题未实现文本外观样式。可能的解决方案如下:

<!-- The main theme/style which should be in use already -->
<style name="MyCustomTheme" parent="@android:style/Theme.Holo.Light">
   <item name="android:actionBarStyle">@style/MyActionBarTheme</item>

   <!-- Not necessary for this exact purpose --> 
   <item name="android:textColor">#FFFFFF</item>
</style>

<style name="MyActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
 <item name="android:background">#3C536B</item>

 <!-- The new, important part! -->
 <item name="android:titleTextStyle">@style/Title</item>
</style>

<style name="Title" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
 <item name="android:textColor">@color/colorName</item>
</style>

@风格/动作风格
#FFFFFF
#3C536B
@风格/标题
@颜色/颜色名称
试试这个

<resources xmlns:android="http://schemas.android.com/apk/res/android">

<style name="ThemeSelector" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/myTheme.ActionBar</item>        
</style>

<style name="myTheme.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">@drawable/lblue</item>
    <item name="android:titleTextStyle">@style/myTheme.ActionBar.Text</item>
    <item name="android:height">@dimen/app_head_height</item>
</style>

<style name="myTheme.ActionBar.Text" parent="@android:style/TextAppearance">
    <item name="android:textColor">@color/white</item>
    <item name="android:textSize">@dimen/app_head</item>
</style> 

@style/mysteme.ActionBar
@可拉伸/蓝色
@style/mysteme.ActionBar.Text
@尺寸/安装头高度
@颜色/白色
@尺寸/安装头

I get error:检索项的父项时出错:未找到与给定名称“@style/TextAppearance.Holo.Widget.ActionBar.Title”匹配的资源。
   <?xml version="1.0" encoding="utf-8"?>
     <resources>
     <style name="MyCustomTheme" parent="@android:style/Theme.Holo.Light">
       <item name="android:actionBarStyle">@style/MyActionBarTheme</item>
       <item name="android:textColor">#FFFFFF</item>
    </style>


     <style name="TitleBarTextColor" parent="@android:style/Widget.Holo.Light.ActionBar">
     <item name="android:actionMenuTextColor">#FFFFFF</item>
   </style>


    <style name="MyActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
     <item name="android:background">#3C536B</item>


   </style>
</resources>
<!-- The main theme/style which should be in use already -->
<style name="MyCustomTheme" parent="@android:style/Theme.Holo.Light">
   <item name="android:actionBarStyle">@style/MyActionBarTheme</item>

   <!-- Not necessary for this exact purpose --> 
   <item name="android:textColor">#FFFFFF</item>
</style>

<style name="MyActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
 <item name="android:background">#3C536B</item>

 <!-- The new, important part! -->
 <item name="android:titleTextStyle">@style/Title</item>
</style>

<style name="Title" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
 <item name="android:textColor">@color/colorName</item>
</style>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

<style name="ThemeSelector" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/myTheme.ActionBar</item>        
</style>

<style name="myTheme.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">@drawable/lblue</item>
    <item name="android:titleTextStyle">@style/myTheme.ActionBar.Text</item>
    <item name="android:height">@dimen/app_head_height</item>
</style>

<style name="myTheme.ActionBar.Text" parent="@android:style/TextAppearance">
    <item name="android:textColor">@color/white</item>
    <item name="android:textSize">@dimen/app_head</item>
</style>