本文介绍了Roboto字体为Android 4+?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否需要使用Roboto字体,并把它的资产文件夹,如果我的应用程序将只支持Android的4 +的设备?

Do I need to use Roboto font and put it to asset folder if my app will support only Android 4+ devices?

我将不胜AP preciate对您有所帮助。亚历克斯。附:对不起,我的英语:)

I would greatly appreciate for your help. Alex. P.S. Sorry for my English:)

推荐答案

您可以使用Roboto从本地的Andr​​oid 4.1及更高版本是这样的:

You can use Roboto natively from Android 4.1+ like this:

android:fontFamily="sans-serif"           // roboto regular
android:fontFamily="sans-serif-light"     // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed

有关的任​​何版本低于这一点,你必须自己加载字体。看this回答我给了一段时间后以了解更多信息。

For any version below that, you have to load the font yourself. Look at this answer I gave a while back for more information.

这篇关于Roboto字体为Android 4+?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 13:58