Domanda

In Android, I have an application that handles multiple rich format text fields. I get the description of the text from an xml and create it as an spannable string builder, adding each run and styling it.

Is there a way to store this on sqlite that doesn't imply storing the whole XML describing the paragraph?

I know it can be done in iOS but I haven't found a way for Android.

Thanks in advance for any answers or tips.

È stato utile?

Soluzione

Is there a way to store this on sqlite that doesn't imply storing the whole XML describing the paragraph?

I do not know what "the whole XML describing the paragraph" is. You can:

  • Use Html.toHtml() to generate HTML from a Spannable, or

  • Roll your own code to convert a Spannable into something that can be stored as a string or byte array

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top