android - Set icon for multichoiceitem -


i hava alerdialog enables user select multiple items.(set using multichoiceitems() method).i want add icon each of these items.is possible.

i want separate icon displayed each of selectable items.i have icons stored in drawable array.any appreciated.

if need custom item renderers multichoice list, - instead of using alertdialog.builder class - should create custom listview checkbox, icon , text, , put in dialog, pop up:

final dialog dialog = new dialog(this); dialog.setcontentview(new mylistview()); dialog.show(); 

where

class mylistview extends listview ... 

is implementation of listview. in it's adapter can inflate simple relativelayout 3 fields need, fill proper data, set checklisteners, , you'll have multichoice list icons, ready set dialog's contentview.


Comments