Deleting items from a ListView using a custom BaseAdapter

后端 未结 3 1559
日久生厌
日久生厌 2021-02-06 05:17

I am using a customised BaseAdapter to display items on a ListView. The items are just strings held in an ArrayList.

The list items have a delete button on them (big red

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 06:04

    you need to implement OnItemClickListener interface, and delete the item in the onItemClick method, one parameter of the method is the position.

提交回复
热议问题