SHARE
TWEET

Untitled

a guest Oct 16th, 2019 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //UnderlineSpan 下划线
  2. v.text = SpannableStringBuilder(str).apply {
  3.   setSpan(UnderlineSpan(), 0, str.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
  4. }
  5.  
  6. //ForegroundColorSpan 设置一段文本的颜色
  7. v.text = SpannableStringBuilder("${mData.p1}/${mData.p2}").apply {
  8.   setSpan(ForegroundColorSpan(resources.getColor(R.color.color_0E91)), 0, mData.p1.toString().length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
  9. }
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