Wednesday, April 23, 2014

Android Strikethrough HTML not rendering in EditText

I was working on supporting strikethrough in EditText of my app. Using StrikethroughSpan, I was able to show it in the EditText element. This strikethrough is converted to <strike></strike> when you use the toHtml() method.

However, when I try to render the strikethrough back to the EditText, I found the Html.fromHtml method does not support strikethough.

The only way to render the strikethough seems to be through the Webview.