TextView显示颜色高亮的问题

 

 

     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) ) ;

 

显示的效果

    

 

posted @ 2015-11-19 14:59  赵彦军  阅读(555)  评论(0编辑  收藏  举报