如何创建机器人工作室自定义字体自定义、机器人、字体、工作室

2023-09-07 12:29:41 作者:心硪進不去ワ

我需要新的字体添加到我的项目 我在哪里在Android的工作室创建

I need to add new fonts to my project where do i create it in android studio

有人可以告知,如果我在Android的工作室正确的目录中创建它?

Can someone advise if i create it in the correct directory in android studio?

我试图把字体文件夹相同的位置,src文件夹,但没有成功。

I tried putting the fonts folder same location as SRC folder but didn't work out

我的code是

Typeface fontRobo = Typeface.createFromAsset(context.getAssets(), "fonts/Roboto-Black.ttf");
viewTotalValue.setText(total.toString());

这是正确的?请指教

Is this correct? please advise

推荐答案

通过这个链接,如果这可以帮助 http://www.androidhive.info/2012/02/android-使用-外部字体/

Go through this link if this can help http://www.androidhive.info/2012/02/android-using-external-fonts/