I have two words inside a TextView:
Hello world.
Now I want to colorize worldred. How can I do this ONLY in the XML itself without using java code (without using Html.fromHtml())
world
Html.fromHtml()
You can use the font tag in string.xml as
<string name="hello">Hello <font fgcolor="red">World</font></string>
Source: https://habr.com/ru/post/1656208/More articles:Непосредственный вывод CultureInfo на разных машинах - .netQuery in Firebase database with large dataset is very slow - androidhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1656205/how-to-ignore-seems-to-be-a-pre-built-javascript-filetry-to-require-the-original-source-to-get-better-results-for-webpack&usg=ALkJrhiuD9DGpfRep5J8FJ3oW5-iLuW7WwReinstalling the maven dependency project raises NoClassDefFoundError in an already running application - javaJdbcBatchItemWriter - incorrect syntax next to the keyword 'ON' - javaHow to prevent repeated button clicks in iOS? - iosReplace the whole string if it contains a substring in pandas - pythonGIT repo repo is way less than original - gitWaiting for a stackmap frame - Java 8 - javaHow to remove an element class doesn't have an img tag using jquery? - javascriptAll Articles