Android: How to requery a Cursor to refresh ListView after deleting database row?

前端 未结 1 961
迷失自我
迷失自我 2020-12-09 21:23

This might be a noob question but I\'m quite new to all this SQLite-Database-Cursor-Adapter-ListView-Do-It-Properly-Stuff.

What I have:

In m

相关标签:
1条回答
  • 2020-12-09 21:53

    How do I refresh my Cursor and my ListView properly?

    You "refresh [your] Cursor" by running your code again to get the Cursor, using the code you used to create the original Cursor (on a background thread, please). You refresh your ListView by calling changeCursor() or swapCursor() on the CursorAdapter.

    0 讨论(0)
提交回复
热议问题