There will be cases where we may want our text in strings.xml intact without adding HTML tags in order for hyperlinks to be shown as underlined and colored blue. Just like my experience.

I did not want the text in my strings.xml file for this certain variable to have HTML formatted tags within it.

Let us have an example:

To make the hyperlink in the TextView to be linkable, simply call this programmatically:

That is all. Do not add the attribute android:autoLink=”web” in your layout XML, or else it won’t work.

Related Posts Plugin for WordPress, Blogger...