0
我正在使用actionbarsherlok我的android项目的库支持actionbar下面的3.0 devices.I设法改变文字颜色为黑/蓝为特定屏幕的操作栏标题在上面的android 3.0。 对于此实现的,我发现这个这是工作在Android 3.0设置文本颜色为android设备的sherlokactionbar的标题2.3
int titleId = getResources().getIdentifier("action_bar_title", "id",
"android");
TextView titleTv= (TextView) findViewById(titleId);
if(titleTv!= null){
titleTv.setTextColor(getResources().getColor(R.color.blue));
titleTv.setTypeface(Typeface.createFromAsset(getAssets(),
"helvetica_medium.otf"));
}
以上但是,对于具有2.3机器人设备,我正在titleTv = NULL。 有没有解决方法? 在此先感谢。