android - How to set Html.fromHtml to SingleChoiceItems? -
i'm trying apply html tags alertdialog -> setsinglechoiceitems();
i searching answers nothing found.
my example code;
final string ex[] = { "<small>some text</small>\n<b>text</b>", "<small>some text</small>\n<b>text</b>", "<small>some text</small>\n<b>text</b>" }; alertdialog.builder dialog = new alertdialog.builder(getactivity()); dialog.settitle("my dialog"); dialog.seticon(r.drawable.icon); dialog.setsinglechoiceitems(ex, 0, null); dialog.show();
how can apply html tags , show them on list?
i try html.fromhtml in string array sais non compatible types.
any help? thanks.
setsinglechoiceitems
accepts array of charsequence
, bot string
, spannable
inherit. should it
final charsequence ex[] = { html.fromhtml("<small>some text</small>\n<b>text</b>"), html.fromhtml("<small>some text</small>\n<b>text</b>"), html.fromhtml("<small>some text</small>\n<b>text</b>") };
Comments
Post a Comment