How to Color part of TextView in Android
Use HTML-escapes + Html.fromHtml()
The trick here is to add HTML Tags for styling in the String and then set that String to TextView.
Keep the string in string (resource)folder like this:
Read the string from string (resource)folder like this
String text = this.getResources().getString(R.string.textFromRes);
Note: The string shown in the above output looks like this
Putting up content takes a lot of time and effort 😓.
👏 clap 👏 If you think you learned something from this article.You can find me on Stackoverflow,Github,and,on Linkedin.
Give feedback and feel free to correct mistakes.