How to extract HTML styled text from an EditText in Android?

Viewed 7219

I am using HTML.fromHTML(...) to style the text of an EditText in Android. I need to pass the styled text back as a result to another activity. However, when I use an intent to pass the contents of the EditText I am unable to figure out how to retain the HTML style of the original text.

As an example, suppose that the original text in the EditText is:

Today is the 21st

When I extract the text of using edittext.getText() and send it back as a result the resulting text is:

Today is the 21st

Is there a way to extract the HTML styled string from the EditText?

3 Answers
Related