Android - Listview delete item and Refresh

后端 未结 9 1865
耶瑟儿~
耶瑟儿~ 2020-12-06 02:16

I am trying to implement ListView with Delete functionality to delete item from the listview. I am successful to delete but failed to refresh the listview after deletetion o

9条回答
  •  醉酒成梦
    2020-12-06 03:15

    Make a new function outside your onCreate block {something like... getdata()} and inside that insert and get all your data and set to the adapter.
    Then call the function again in your onResume() block. So whenever you will delete the data from the list it will reflect immediately.

提交回复
热议问题