1,布局文件中设置
//设置字体
android:typeface="normal" //sans serif monospace
设置和样式
android:textStyle="normal" //bold 粗体 italic斜体
android:fontFamily=""
2.java代码设置
textVie.setTypeface(Typeface.DEFAULT); //设置字体,相当于xml中设置android:typeface属性
textVie.setTypeface(Typeface.DEFAULT,Typeface.BOLD_ITALIC); //设置字体和样式
相当于在xml中设置android:typeface属性和android:textStyle属性