Say my application has a ListView that displays information from a Sqlite database, using a SimpleCursorAdapter. Other threads will be updating the relevant tables in the database, and the ListView should update automatically.
The SimpleCursorAdapter I create doesn’t seem to be watching the database for updates. I call the following function after updating the table.
((CursorAdapter) this.getListAdapter()).notifyDataSetChanged();
What is the best way to do this?
Using just a SimpleCursorAdapter you will need to call
notifyDataSetChangedon the ListView to force it to refresh.