Android ActionBar textSize by Html.fromHtml?
我是一种黑客我的方式,使我的ActionBar的方式,我想。我不能在我的情况下使用customview,因为其他代码会冲突。现在我正在显示我的ActionBar,如下所示:Android ActionBar textSize by Html.fromHtml?,android,html,text,android-actionbar,Android,Html,Text,Android Actionbar,我是一种黑客我的方式,使我的ActionBar的方式,我想。我不能在我的情况下使用customview,因为其他代码会冲突。现在我正在显示我的ActionBar,如下所示: ActionBar actionBar = getActionBar(); actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#0069B5"))); actionBar.setTitle(Html.fromHtml("<font c
ActionBar actionBar = getActionBar();
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#0069B5")));
actionBar.setTitle(Html.fromHtml("<font color = '#ffffff'>Title</font>"));
ActionBar ActionBar=getActionBar();
actionBar.setBackgroundDrawable(新的ColorDrawable(Color.parseColor(“#0069B5”));
actionBar.setTitle(Html.fromHtml(“Title”);
我是否可以指定文本大小,如颜色和标题 html.fromHtml()只能识别特定的基本html标记。。您可以使用:
int resId = getResources().getIdentifier("action_bar_title", "id", "android");
TextView title = (TextView) findViewById(titleId);
title.setTextSize(20); // value in sp
我就是这样做的。当/findviewbyd不在XML中时,如何设置它?