Skip to content Skip to sidebar Skip to footer

Storing Spannable To A String

i'm writing a chat application, and to parse emotion icons i use code from here Displaying emoticons in Android my chat text is stored like 'SENDER|TIME|NON_PARSED_CHAT_TEXT' in an

Solution 1:

is there any possible way to store Spannable object (chat text after parsing resulted from the function in the question provided) to string in an ArrayList with the time and sender?

You are welcome to use toHtml() on the Html class, though that can only handle some HTML output, not arbitrary things.

You could also have an ArrayList that holds the Spannable rather than a String conversion of that Spannable.


Post a Comment for "Storing Spannable To A String"