您的位置:首页 > 其它

TextView显示颜色高亮的问题

2017-05-16 14:39 218 查看
 
 

TextView textView = (TextView) findViewById( R.id.tv );

String text =  "<font color=\"#d93b3a\">" + "快过年了" + "</font>"  +
"<font color=\"#666666\">" + "哈哈哈哈" + "</font>"  +
"<font color=\"#00caca\">" + "我是绿色的" + "</font>"  ;

textView.setText( Html.fromHtml(text) ) ;


 

显示的效果

    


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: