0
I applied a different color to certain words within some Textviews with the TAG <font color='#2086F3'></font>
.
I was able to get this result after an Internet search. The problem is that this feature only works for more current versions of Android, in older versions the word is even displayed.
Trying to avoid this, I thought I’d do a version of strings.xml
for newer versions and one for older versions of Android.
It would be something like that:
Newer version strings.xml
:
<string name="txt_fone">Informe seu <font color='#2086F3'>telefone</font> com DDD</string>
<string name="txt_email">Informe seu <font color='#2086F3'>email</font></string>
Older version strings.xml
:
<string name="txt_fone">Informe seu telefone com DDD</string>
<string name="txt_email">Informe seu email</string>
It is possible to load a specific XML for the Android version, or if it exists, some command or conditional TAG that opts for one or another code?