使用Android中的自定义字体 [英] Using a custom typeface in Android

查看:198
本文介绍了使用Android中的自定义字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用自定义字体为我而我创建Android应用程序。
我可以单独改变从code每个对象的字体,但我有数百人。

因此​​,

  • 有没有办法从XML做到这一点? [设置自定义字体]
  • 有没有办法从code做在一个地方,说整个应用和所有的组件应该使用,而不是默认的?
  • 自定义字体

感谢。
- codevalley

解决方案
  

有没有办法从做   XML?

没有,对不起。您只能通过XML指定内置字体。

  

有没有办法从code做的   一处,以说,整个   应用和所有组件   应使用自定义的字体,而不是   默认吗?

这并不是说我知道。

I want to use a custom font for my android application which I am creating.
I can individually change the typeface of each object from Code, but I have hundreds of them.

So,

  • Is there a way to do this from the XML? [Setting a custom typeface]
  • Is there a way to do it from code in one place, to say that the whole application and all the components should use the custom typeface instead of the default one?

Thanks.
-Codevalley

解决方案

Is there a way to do this from the XML?

No, sorry. You can only specify the built-in typefaces through XML.

Is there a way to do it from code in one place, to say that the whole application and all the components should use the custom typeface instead of the default one?

Not that I am aware of.

这篇关于使用Android中的自定义字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆