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

后端 未结 4 514
太阳男子
太阳男子 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条回答
  •  攒了一身酷
    2021-02-01 02:14

    As answered by @Nikolay Elenkov In Kotlin I used it from string resources in this way (detailed way for freshers):

    in my layout place a checkbox:

    
    

    in strings.xml

    I read and accept the Terms and Conditions
    

    in my activity class inside the onCreate() method:

    termsCB.movementMethod = LinkMovementMethod.getInstance()
    

提交回复
热议问题