Можно ли поменять цвет некоторых букв в самом string.xml или программно, как это можно сделать?
<string-array name="colors">
<item>I read the letter.</item>
<item>It is only with the heart that one can see rightl.</item>
<item>One can become a writer only if he is talented.</item>
<item>They say, the winter will be cold.</item>
</string-array>
<string-array name="colors">
<item>
<![CDATA[
<font color="#005500">I</font> read the letter.
]]>
</item>
<item>It is only with the heart that one can see rightl.</item>
<item>One can become a writer only if he is talented.</item>
<item>They say, the winter will be cold.</item>
</string-array>
Html.fromHtml(getResources().getStringArray(R.array.colors)[0])
Программно:
final SpannableStringBuilder text = new SpannableStringBuilder("Text");
final ForegroundColorSpan style = new ForegroundColorSpan(Color.rgb(255, 0, 0));
text.setSpan(style, 0, 1, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
textView.setText(text);
Современные инструменты для криптотрейдинга: как технологии помогают принимать решения
Апостиль в Лос-Анджелесе без лишних нервов и бумажной волокиты
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости