Is it possible to set multiple styles for different pieces of text inside a TextView?
For instance, I am setting the text as follows:
tv.setText(line
Here is an easy way to do so using HTMLBuilder
myTextView.setText(new HtmlBuilder().
open(HtmlBuilder.Type.BOLD).
append("Some bold text ").
close(HtmlBuilder.Type.BOLD).
open(HtmlBuilder.Type.ITALIC).
append("Some italic text").
close(HtmlBuilder.Type.ITALIC).
build()
);
Result:
Some bold text Some italic text