I have the following declared text in string.xml :
<string name="TITLE_EXAMPLE"><![CDATA[
<p>Para entrar em contato com nossa Central:</p>
<p><b>Brasil: Capitais</b></p>
<p> <a href="tel:+5541123123123" style="color:#E29800"> 5541123123123</a> </p>
]]>
</string>
How do I apply a certain color to ahref ?
Even with style is not working!
[EDIT]
At the suggestion of psr village :
TextView contact = findViewById(R.id.contact);
String html;
contact.setMovementMethod(LinkMovementMethod.getInstance());
if (Build.VERSION.SDK_INT >= Build.VERSIONS_CODE.N) {
html = Html.fromHtml(getString(R.string.codeHtml), FROM_HTML_OPTION_USE_CSS_COLORS);
} else {
html = Html.fromHtml(getString(R.string.codeHtml));
}
contact.setText(html);
Only works on versions of N up!
I would like to apply on all versions!