我用Android的动作栏样式生成器的网站,以产生样式我的动作条。
I use "Android Action Bar Style Generator" website to generate styles for my actionBar.
有没有可能改变动作条的文本颜色?
There is no possibility to change the text color of actionBar ?
http://jgilfelt.github.io/android-actionbarstylegenerator/#name=RoseNormal&compat=holo&theme=light&actionbarstyle=solid&texture=0&hairline=0&neutral$p$pssed=1&backColor=e64260%2C100&secondaryColor=b8344c%2C100&tabColor=fff%2C100&tertiaryColor=F2F2F2%2C100&accentColor=33B5E5%2C100&cabBackColor=FFFFFF%2C100&cabHighlightColor=33B5E5%2C100
您可以使用此:
int actionBarTitleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
if (actionBarTitleId > 0) {
TextView title = (TextView) findViewById(actionBarTitleId);
if (title != null) {
title.setTextColor(Color.RED);
}
}
获得的TextView
的ID对动作条(actionBarTitleId),那么你什么都想要。改变大小,颜色和......
get id of textView
on Actionbar
( actionBarTitleId ) then do what ever you want. change size, color and ....
如果你想使用的风格和更多信息请参见这个主题
if you want use style and for more info see This Thread