How to set the part of the text view is clickable

后端 未结 20 1451
无人共我
无人共我 2020-11-22 01:29

I have the text \"Android is a Software stack\". In this text i want to set the \"stack\" text is clickable. in the sense if you click on t

20条回答
  •  我寻月下人不归
    2020-11-22 02:33

    It really helpful for the clickable part for some portion of the text.

    The dot is a special character in the regular expression. If you want to spanable the dot need to escape dot as \\. instead of just passing "." to the spanable text method. Alternatively, you can also use the regular expression [.] to spanable the String by a dot in Java.

提交回复
热议问题