Dynamically setting links to text in strings.xml

后端 未结 4 1938
野趣味
野趣味 2020-12-15 11:12

I\'m trying to make an app with localisation built in, but I want a way that I can create a web link within the text, the URL being defined elsewhere (for ease of maintenanc

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 11:14

    You have to implement

    setMovementMethod(LinkMovementMethod.getInstance());
    

    on your Textview

    Here is a better example:

    clickable-urls-in-android-textviews

提交回复
热议问题