1

I have a string that contain html tags. So for set text into TextView I use:

textView.setText(Html.fromHtml(myString));

It's works good.

Also I have own method convertText() with type SpannableStringBuilder. In which method I convert text, where I have something like [text="information"]. I use next for set text:

textView.setText(convertText(myString), TextView.BufferType.SPANNABLE);

For example: myString = "<h1> This is [text="information"]. </h1>" The result must be: This is INFORMATION. (with h1 formatted text. caps lock of word information works in method convretText() good)

It's also works good. But how I can use these two setText approach in one time?

user3499878
  • 1,023
  • 2
  • 10
  • 15

0 Answers0