Skip to content Skip to sidebar Skip to footer

Setting Hyperlink Android In Textview Based On String.xml

my string.xml string line <a href="http://www.abc.com">abc Technology </a> and this is

Solution 1:

The quotes should also be escaped otherwise Java will remove them during getString(). Add backslashes before &quot;

<stringname="companyLink">&lt;a href=\&quot;http://www.abc.com\&quot;&gt;abc Technology &lt;/a> </string>

Or this solution that worked for me:

https://stackoverflow.com/a/9949264/1011746

Solution 2:

I believe the correct syntax is:

<a href="http://abc.com">abc string </a>

Post a Comment for "Setting Hyperlink Android In Textview Based On String.xml"