android 自定义字体 字体库 字体格式 使用攻略
2014-04-09 15:01
465 查看
先上图片;
部分关键代码:
public TextView makeText(String type,int size) {
Typeface face = Typeface.createFromAsset(getAssets(), type);
TextView tv = new TextView(this);
tv.setText(R.string.helloChina);
tv.setTypeface(face);
tv.setTextSize(size);
return tv;
}
字体库文件加载位置;
部分关键代码:
public TextView makeText(String type,int size) {
Typeface face = Typeface.createFromAsset(getAssets(), type);
TextView tv = new TextView(this);
tv.setText(R.string.helloChina);
tv.setTypeface(face);
tv.setTextSize(size);
return tv;
}
showLay.addView(makeText("fonts/MetaSerifOT-Book.ttf",12)); showLay.addView(makeText("fonts/MetaSerifOT-Book.ttf",18)); showLay.addView(makeText("fonts/MetaSerifOT-Book.ttf",24)); showLay.addView(makeText("fonts/MetaSerifOT-Book.ttf",36));
字体库文件加载位置;
相关文章推荐
- android 自定义字体 字体库 字体格式 使用攻略
- 如何在Android开发中使用自定义的字体库
- Android APP使用自定义字体实现方法
- Android 中使用自定义字体的方法
- Android实例-使用自定义字体文件(XE8+小米2)
- Android使用自定义字体
- Android教程之如何使用自定义字体
- 在android里面使用自定义字体
- Android 中使用自定义字体的方法
- Android之自定义背景Button按钮、自定义形状Button的全攻略、设置字体颜色
- Android 自定义字体,更换系统默认显示的字体使用自定义字体
- 使用poi对excel条件格式设置字体颜色使用自定义的颜色
- Android 中使用自定义字体的方法
- Delphi XE5开发Android程序使用自定义字体文件.
- Android教程之如何使用自定义字体
- android开发步步为营之99:使用自定义字体
- 在ANDROID中使用自定义字体
- 在Android开发中使用自定义的字体库
- Android 中使用自定义字体的方法
- Android 使用自定义字体