现在的位置: 首页 > 综合 > 正文

Android TextView中 字体加粗方法

2018年01月16日 ⁄ 综合 ⁄ 共 256字 ⁄ 字号 评论关闭

转载:http://blog.csdn.net/haukey/article/details/8212164

textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗
textView.getPaint().setFakeBoldText(true);//加粗
//上面的方法对中文是没效果的,中文加粗可以用以下的方法
TextPaint tp = glcdTextView.getPaint();
tp.setFakeBoldText(true);

抱歉!评论已关闭.