Android 字体加粗的两种方法

Android中字体加粗


一、在xml文件中使用

android:textStyle=”bold”

 
二、但是不能将中文设置成粗体,将中文设置成粗体的方法是: 

TextView tv = (TextView)findViewById(R.id.TextView01); 
TextPaint tp = tv.getPaint(); 
tp.setFakeBoldText(true);

转载自: http://blog.csdn.net/to_cm/article/details/6002812

你可能感兴趣的:(Android 字体加粗的两种方法)