Android-Is it possible to add a clickable link into a string resource

后端 未结 4 548
太阳男子
太阳男子 2021-02-01 01:27

I usually set up some kind of AlertDialog to fire off when a user first uses one of my apps and I explain how to use the app and give an overall introduction to wha

4条回答
  •  萌比男神i
    2021-02-01 02:01

    Just use an HTML format link in your resource:

    Click me!

    You can then use setMovementMethod(LinkMovementMethod.getInstance()) on your TextView to make the link clickable.

    There is also TextView's android:autoLink attribute which should also work.

提交回复
热议问题