I fetch html data and wish to show it in a rich text editor in android. I can do it as long as long as they just have basic stuff like bold, italic. How can I findout if the text has other Spanned or spannables used which gives me early warning for incompatibility?
Spanned.getSpans() works but its specific for each span e.g. underline, fontFace. I would have to call getSpans for all varia开发者_StackOverflow中文版nts. Isn't there a method that would return all types of spans used in the text?
I dont really wann use regex or string operations for this.
You can pass Object.class
to Spanned.getSpans()
to get all spans or you can pass CharacterStyle.class
to get all style spans.
精彩评论