Use cursor.requery(). See here for a working example: http://github.com/commonsguy/cw-android/tree/master/Database/Constants/
On Thu, Aug 26, 2010 at 1:08 AM, Vibhor Mahajan <[email protected]> wrote: > Hello, > > I have a list which shows data from a database using a cursor adapter. > Using Menu option I am updating my database (inserting more rows \ > deleting existing rows). When Menu operation completes, I want > contents of list should show updated contents. > > I have tried using cursor.requery(); (or explicitly querying cursor > again) and using adapter.notifydatasetchanged(), but with this list of > contents are not updated. > > Kindly suggest how can I refresh the contents of the list > > Thanks, > Vibhor > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

