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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -