how to refresh the listView using the Cursor Adapter

前端 未结 6 2247
名媛妹妹
名媛妹妹 2021-01-05 07:56

I have created a ListView using CursorAdapter . Now I am Trying to update the ListView and Refresh the value to the ListView .

6条回答
  •  悲哀的现实
    2021-01-05 08:17

    If CursorDemo extends CursorAdapter, then you have to use adapter.swapCursor(cursor_update);

    That should swap the old cursor out for the new one and reload the data. With swapCursor, the old cursor is not closed.

提交回复
热议问题