Android TextView中 代码字体加粗方法

textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗

textView.getPaint().setFakeBoldText(true);//加粗

txtName.setText(Html.fromHtml("<font color='#272727'><b>"+top_name+"</b></font>"));

猜你喜欢

转载自blog.csdn.net/androidsj/article/details/80997280