SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  SpannableStringBuilder spannableString = new SpannableStringBuilder(text);
  2.             ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.color_blue_01abef));
  3.             spannableString.setSpan(foregroundColorSpan, text.lastIndexOf(mEllipse), text.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
  4.             setMovementMethod(LinkMovementMethod.getInstance());
  5.             ClickableSpan clickableSpan = new ClickableSpan() {
  6.                 @Override
  7.                 public void onClick(@NonNull View widget) {
  8.                     ExpandableTextView.this.onClick(ExpandableTextView.this);
  9.                 }
  10.  
  11.                 @Override
  12.                 public void updateDrawState(@NonNull TextPaint ds) {
  13.                     ds.setUnderlineText(false);
  14.                 }
  15.             };
  16.             spannableString.setSpan(clickableSpan, text.lastIndexOf(mEllipse), text.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
  17.             super.setText(spannableString);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top