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

早过忘川 提交于 2019-11-28 09:19:26

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!