1、可以通过定义messagetextview,在该类中重写dispatchtouchevent()和onTouchEvent(),对于非链接部分的点击传递给上层处理。
2、定义URLSpan和textSpan,分别重写onclick函数,分别处理。在预处理部分,首先定义spannable sp和spannableStringBuilder style,
通过sp.getSpanStart和sp.getSpanEnd分别去识别text和url的位置,然后用style.setSpan(textSpan/URLSpan,start,end,Spannable.SPAN_EXCLUSIVE_INCLUSIVE).
最后得到CharSequence formatText=com.android.mms.util.SmileyParser.getInstance().addSmileySpans(style).
然后mBodyTextView.setText(formatText)拼接字符串并赋予textView.