Android ListView with multiple select and custom adapter

前端 未结 3 589
悲哀的现实
悲哀的现实 2021-01-11 13:23

I have a ListView with a custom adapter. The ListView allows multiple select, but somehow it\'s not recognising when an item is selected.

I

3条回答
  •  感动是毒
    2021-01-11 13:45

    Just have a try:

    1. listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

    2. holder.checkbox.setFocusable(false);

    3. I think that is the listView's sub item view shoudld implements the Checkable interface, that means the converted View(convertView) should have all the method of Checkable.

提交回复
热议问题