Android textview 设置字体样式

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qulonglong110/article/details/84990646
public void setFontSanFrancisco(Context context, TextView textView) {
    Typeface typeface = Typeface.createFromAsset(context.getAssets(), "SanFranciscoDisplayRegular.ttf");
    textView.setTypeface(typeface);
}

字体包放在assets目录下

猜你喜欢

转载自blog.csdn.net/qulonglong110/article/details/84990646
今日推荐