androidhtmlformattingsymbolsspannable

Converting a symbol to HTML entity code in Android


Are there any classes that can take a symbol in a string that is typed in an editText box and replace it with the HTML entity code? Not take the HTML entity code and display the symbol.

For example: if a string is "2∏" is there anything prebuilt that can take it and return "2& #8719;"?


Solution

  • I ended up using HTML.to (Spanned text).