Android ListView with multiple select and custom adapter

前端 未结 3 560
悲哀的现实
悲哀的现实 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:48

    I had a similar problem. My list item view is a RealativeLayout with a LinearLayout containing a CheckBox and a TextView. No onItem...Listener was called until I did set the CheckBox.focusable to false. Furthermore not the objects in the adapter should be Checkable but the views used as the layout for the list item.

提交回复
热议问题