Remove selected item from ListView

前端 未结 3 626
無奈伤痛
無奈伤痛 2020-12-21 13:53

I want to delete the selected item from the ListView but I can\'t. I\'ve tried a lot of methods but they aren\'t working for me.

This is my adapter list

3条回答
  •  青春惊慌失措
    2020-12-21 14:37

    Implement the onitemclickListener and get the item(get ID) clicked in the arrayadapter and then call arrayList.remove([ID]); adapter.notifyDataSetChanged();

提交回复
热议问题