Android - Setting TextView to Bold Not Working

前端 未结 10 1695
悲哀的现实
悲哀的现实 2020-12-17 08:43

Here is the XML:



        
10条回答
  •  不思量自难忘°
    2020-12-17 08:53

    Try using HTML tags in your strings.xml file. This is how you can do it, android string.xml reading html tags problem

    To do it programmatically,

    TextView t = new TextView(mContext);
    t.setText(Html.fromHtml("This is bold"));
    

提交回复
热议问题