嗨,我在写一个Android应用程序。我想在它的roboto字体,无论手机的版本。有办法吗?
谢谢,
Rahim。
最佳答案
是的,为什么不呢,你可以得到Roboto字体:
Android ICS typography
假设要更改文本视图的字体:
Typeface tf = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-Black.ttf");
TextView tv = (TextView) findViewById(R.id.FontTextView);
tv.setTypeface(tf);