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
Post a Comment