Android使用外部字体

来源:互联网 发布:幼儿网络教育所处行业 编辑:程序博客网 时间:2024/06/03 18:49
1、下载TTF字体文件
2、在目录assets中新建fonts目录,将我们需要使用的ttf字体文件复制进去

TextView mTextView = (TextView) findViewById(R.id.
mTextView);
Typeface typeFace = Typeface.createFromAsset(getAssets(), "fonts/font.TTF");
mTextView.setTypeface(typeFace);
mTextView.setText("你个呵呵,字体改了没???);
0 0
原创粉丝点击