在xml布局文件中设置android:textStyle=“bold”可以将英文字母和阿拉伯数字设置成粗体,对中文不起作用。
将中文设置成粗体的方法是: TextView textView = (TextView)findViewById(R.id.textView);
TextPaint tp = textView .getPaint();
tp.setFakeBoldText(true);
在xml布局文件中设置android:textStyle=“bold”可以将英文字母和阿拉伯数字设置成粗体,对中文不起作用。
将中文设置成粗体的方法是: TextView textView = (TextView)findViewById(R.id.textView);
TextPaint tp = textView .getPaint();
tp.setFakeBoldText(true);