您的位置:首页 > 其它

一种字体两种形式,加粗

2014-12-02 17:39 148 查看
spanText =
new SpannableString("萝卜白菜的博客 -- http://orgcent.com");
spanText.setSpan(new ForegroundColorSpan(Color.BLUE),
6, spanText.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);

mTVText.append("\n");

mTVText.append(spanText);

 
spanText =
new SpannableString("StyleSpan -- 萝卜白菜的博客");
//Typeface.BOLD_ITALIC:粗体+斜体

spanText.setSpan(new StyleSpan(Typeface.BOLD_ITALIC),
3, 7, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);

mTVText.append("\n");

mTVText.append(spanText);
 
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐