Lines Matching refs:text
19 import android.text.Spannable;
20 import android.text.TextPaint;
21 import android.text.method.LinkMovementMethod;
22 import android.text.style.ClickableSpan;
43 * Applies the text into the {@link TextView} and part of it a clickable link.
44 * The text surrounded with "LINK_BEGIN" and "LINK_END" will become a clickable link. Only
46 * @return true if the link has been successfully applied, or false if the original text
49 public static boolean linkify(TextView textView, StringBuilder text,
52 final int beginIndex = text.indexOf(PLACE_HOLDER_LINK_BEGIN);
54 textView.setText(text);
57 text.delete(beginIndex, beginIndex + PLACE_HOLDER_LINK_BEGIN.length());
58 final int endIndex = text.indexOf(PLACE_HOLDER_LINK_END);
60 textView.setText(text);
63 text.delete(endIndex, endIndex + PLACE_HOLDER_LINK_END.length());
65 textView.setText(text.toString(), BufferType.SPANNABLE);