首页 > 学院 > 开发设计 > 正文

TextView 利用html换行和加粗字体

2019-11-09 16:49:18
字体:
来源:转载
供稿:网友

写法如下:

<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> delivers messages faster than<![CDATA[<br/>]]>any other application.</string>

textView1.setText(Html.fromHtml(getResources().getString(R.string.Page2Message)));

总结把需要用html格式的文字用![CDATA[需要格式的html代码]]>包起来


上一篇:APT技术

下一篇:dispatch_sync死锁

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表