android中英文加粗比较容易,中文加粗如何实现呢?
可以再xml中配置:
android:textStyle="bold"
中文字体加粗
只能在代码中配置:
TextPaint tp= textview.getPaint();
tp.ssetFakeBoldText(true);
引用Html举例:
mReasonB.setText(
Html.fromHtml(
getText(R.string.reason_eat).toString()+
"<font color='"+getResources().getColor(R.color.string_title_sub)+"'>"+
getText(R.string.checkmany).toString()+"</font>"));