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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -