I have a string name "classe". It contains many words and phrases in it. But I want to change color when string contains the word "idiom"
. I did that programmatically, but it changed the color of all string "classe". I just want to change the color of "idiom" (a part of word, not the whole phrase). How can I do that programmatically?
if (classe.contains("idiom")) {
txtclasse.setTextColor(getResources().getColor(R.color.orange));
}