Android中设置中文粗体的方法
16lz
2021-01-23
在xml文件中使用android:textStyle="bold" 可以将英文设置成粗体,但是不能将中文设置成粗体,
将中文设置成粗体的方法是:
TextView tv = (TextView)findViewById(R.id.TextView01); TextPaint tpaint = tv.getPaint(); tpaint .setFakeBoldText(true);
更多相关文章
- android 中文 API (41) —— RatingBar.OnRatingBarChangeListen
- android api 中文 (75)—— AdapterView.OnItemClickListener
- 去除listBView的抖动,判断textView中文本长度是不是超过预定值
- Android中文API(142) —— Gravity
- android中文api(89)——ViewManager
- Android 中文API(86)——ResourceCursorAdapter
- Android中文API(144) —— JsonWriter
- android 中文api (62) —— ViewSwitcher.ViewFactory
- android api 中文 (74)—— AdapterView.AdapterContextMenuInfo