【发布时间】:2015-07-23 10:13:48
【问题描述】:
如何将自定义字体添加到 <TextView /> 或 Android 应用程序的自定义视图中?
【问题讨论】:
标签: java android textview custom-font
如何将自定义字体添加到 <TextView /> 或 Android 应用程序的自定义视图中?
【问题讨论】:
标签: java android textview custom-font
试试这个,
TextView tx = (TextView)findViewById(R.id.hello);
Typeface custom_font = Typeface.createFromAsset(getAssets(),
"fonts/Erika Type.ttf");
tx.setTypeface(custom_font);
【讨论】: