Sherlock Actionbar自定义字体

时间:2013-03-30 11:01:30

标签: android actionbarsherlock custom-font

我想将操作栏标题标签菜单项的字体更改为Roboto。

我想弄清楚这是否可以通过样式完成?因为我无法为这些创建自定义视图,这是分配custm字体的最佳方式。

我已经浏览了以下链接

https://stackoverflow.com/a/14681975/155196

How to Set a Custom Font in the ActionBar Title?

1 个答案:

答案 0 :(得分:4)

这是为我做的代码:

<style name="AppTheme" parent="AppBaseTheme">
    ...
    <item name="android:typeface">serif</item>
    ...
</style>

查看here默认情况下android上可用的字体。 从我读到的内容中添加其他字体是不可能的,如果不对您的视图进行子类化,那么我无法帮助您。

编辑:我可能错了。看看这个:http://www.jayway.com/2013/01/22/custom-typeface-in-android/ 在这里:http://www.androidguys.com/2008/08/18/fun-with-fonts/