RSS

Bind and refresh list once done using cursor

02 Jan

Many times we face issue to refresh list once done with data binding or deleting some record from list.
One simple solution will help you to get resolve this issue.

The solution includes:

private void updateList(){
 cursor.requery();
}

Note:
This method was deprecated in API level 11. Don’t use this. Just request a new cursor, so you can do this asynchronously and update your list view once the new cursor comes back.

Ref: http://android-er.blogspot.in/2011/06/delete-row-in-sqlite-database.html

Advertisements
 
Leave a comment

Posted by on January 2, 2014 in Android Database

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: