你好我写一个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);