textView 使用HTML标签

来源:互联网 发布:生产数据分析报告 编辑:程序博客网 时间:2024/06/07 02:08
eg:StringBuilder  str = new StringBuilder();str.append("<font color='blue' size = '14'>").append("我是谁").append(" </font>");str.append("<font size = '14'>").append("我在哪").append("</font>");str.append("<br>");
textView.setText(Html.fromHtml(str.toString()));

显示:

我是谁我在哪 -----字体大小为14



原创粉丝点击