Roboto字体在我的Andr​​oid应用程序 [英] Roboto font in my android app

查看:140
本文介绍了Roboto字体在我的Andr​​oid应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我写一个Android应用程序。我想roboto字体,它无论在手机的版本。有没有办法做到这一点?

Hi i am writing an android app. And I want the roboto font in it irrespective of the version of the phone. Is there a way to do it?

谢谢, 拉希姆。

推荐答案

是啊,为什么不,你可以得到的Roboto字体:

Yeah why not, you can get the Roboto font :

安卓ICS排版

比方说,你想改变文本视图的字体:

Lets say you want to change the font of a text view :

   Typeface tf = Typeface.createFromAsset(getAssets(),
            "fonts/Roboto-Black.ttf");
    TextView tv = (TextView) findViewById(R.id.FontTextView);
    tv.setTypeface(tf);

这篇关于Roboto字体在我的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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