android中为textview动态设置字体为粗体
textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗
TextView textView = (TextView)findViewById(R.id.textView);
TextPaint tp = textView .getPaint();
tp.setFakeBoldText(true);
android中为textview动态设置字体为粗体
textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗
TextView textView = (TextView)findViewById(R.id.textView);
TextPaint tp = textView .getPaint();
tp.setFakeBoldText(true);