在Android Actionbar中设置特定字体



我正在尝试在我的Android应用中设置SANS Serif Thin Font。我能够在listView中设置它,现在我想在动作栏和设置旋转器中进行相同的操作,但是我有麻烦,任何人都可以帮助我?

谢谢

编辑:我在这里找到了解决方案 -> http://www.tristanwaddington.com/2013/03/styling-the-android-actor-bar-action-bar-with-a-custom-font/

编辑:封闭

尝试此代码。

if(build.version.sdk_int> = 11){

最终动作栏ActionBar = getActionBar();actionbar.setBackgroundDrawable(getResources()。getDrawable(r.drawable.action.bar_bg_warning)));actionbar.settitle(html.fromhtml(" ") stringa " ");

}

它设置了withe标题。尝试在XML上添加标签 样式:" font-family =" nome_font"

最新更新