I have a string defined in string.xml
like
Title: %1$s
which is formatted us
Actually, many of the answers are obsolete. After researching by myself, what I've found out that the best answer is one by @Wahib. Here's the improved version:
Define the string resource as a:
Hey, <b>this is bold</b> text
Use the resource like this:
String text = getResources().getString(R.string.styled_text);
CharSequence styledText = HtmlCompat.fromHtml(text, HtmlCompat.FROM_HTML_MODE_LEGACY);
textview.setText(styledText);
Here's the result: