How to including a link in a body of text in android string resource -


i have string resource named large_text as

<string name="large_text">    "lots of texts"   ...   "lots more text\n\n"   ...   "i not kidding"   "so here phrase want make hyperlink" </string> 

so how make short phrase within large body of text hyperlink? the suggestion here not working: string.xml not compile. gives error

error: content of elements must consist of well-formed character data or markup.

even faced issue while using strings.xml ended using , works me.

 useageterms.settext(html.fromhtml("by tapping register, agree the\n " +             "<a href=\"http://www.google.in/terms.html\">terms & conditions</a> google"));  useageterms.setmovementmethod(linkmovementmethod.getinstance()); 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -