ListView not “refreshing” after item is deleted from it

后端 未结 6 1648
半阙折子戏
半阙折子戏 2021-01-28 16:27

I am trying to figure out how I \"Refresh\" the list view the user is on when an item from my listview is deleted. I have tried notifyDataSetChanged() but to no avail, which is

6条回答
  •  粉色の甜心
    2021-01-28 17:15

    In my app, I don't use notifyDataSetChanged at all. To refresh the ListView, I simply run the database query again and use CursorAdapter.changeCursor. It will automatically call notifyDataSetChanged as needed.

提交回复
热议问题