Я пытаюсь создать приложение для Android для доски объявлений. Чтобы отобразить форматированный html для содержимого сообщения, я выбрал метод TextView и Html.fromHtml(). Это, к сожалению, распространяется только на несколько html-тегов. Неизвестные теги обрабатываются классом, который реализует TagHandler и должен быть сгенерирован мной.
Теперь я много googled и не могу найти пример того, как этот класс должен работать. Пусть у меня есть тег u для подчеркивания некоторого текста (я знаю, что это устарело, но что угодно). Как выглядит мой TagHandler?
Он вызывается следующим образом:
public void handleTag(boolean opening, String tag, Editable output, XMLReader xmlReader) {
Первые два аргумента хороши. Думаю, мне нужно модифицировать вывод, используя output.append(). Но как мне добавить что-то, подчеркнутое там?