SpannableString spanStr = new SpannableString(str); spanStr.setSpan(new ForegroundColorSpan(ContextCompat.getColor(this, R.color.color_gray)), 0, str.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); tv_terms.append(spanStr); tv_terms.append(SPACING); tv_terms.setMovementMethod(LinkMovementMethod.getInstance());//设置该句使文本的超连接起作用 final int colorOrange = ContextCompat.getColor(this, R.color.color_describe);
TextView之富文本
设置文本颜色与链接
最新推荐文章于 2024-12-09 15:50:34 发布
1214

被折叠的 条评论
为什么被折叠?



