Android - ActionBarSherlock - 设置菜单中文本的文本颜色 [英] Android - ActionBarSherlock - Set textcolor of text in menu

查看:22
本文介绍了Android - ActionBarSherlock - 设置菜单中文本的文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文本的白色更改为橙​​色.

I want to change white color of text to orange.

这是一个例子.

推荐答案

这可以通过为您的操作栏设置一些样式来完成.这篇博文中对此进行了解释 http://android-developer.blogspot.com.au/2011/04/customizing-action-bar.html

This can be done through setting some styles for your action bar. It is explained in this blog post http://android-developers.blogspot.com.au/2011/04/customizing-action-bar.html

您需要为您的应用设置您的风格.

You need to set this in your style for you app.

<style name="MyTheme" parent="android:style/Theme.Holo.Light">
     <item name="android:dropDownListViewStyle">@style/MyDropDownListView</item>
</style>

然后你可以用你自己的文字颜色来指定这个样式.

Then you can specify this style with your own text color.

<!-- style the items within the overflow menu -->
<style name="MyDropDownListView" parent="android:style/Widget.Holo.ListView.DropDown">
    <!-- This is the orange text color -->
    <item name="android:textColor">#CC3232</item>
</style>

这篇关于Android - ActionBarSherlock - 设置菜单中文本的文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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