Spannable span = Spannable.Factory.getInstance().newSpannable("click");
String text = span.toString();
int start = text.indexOf("click");
int end = start + "click".length();
span.setSpan(new ClickableSpan() {
@Override
public void onClick(View widget) {
}
@Override
public void updateDrawState(TextPaint ds) {
ds.linkColor = 0xff000000;
super.updateDrawState(ds);
}
}, start, end, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
view.setText(span);
view.setHighlightColor(Color.TRANSPARENT);
view.setMovementMethod(LinkMovementMethod.getInstance());
댓글