> I set a CursorAdapter to a ListActivity as below: > > ReminderCursorAdapter adapter = new ReminderCursorAdapter(this, > cursor, true); > this.setListAdapter(adapter); > > There are 3 items in the listview, "111", "222", 333" > > If I delete the item "222" from the Cursor, the listActivity will be > updated automatically and the count of item is 2. > But "222" and "333" can be seen. Seems the item "111" was deleted. > > If I close the application and launch it again, there will be 2 items > "111" and "333". > > Do you have any idea?
Are you implementing getView() in ReminderCursorAdapter? My guess is yes, given the structure of your constructor. If so, make sure that there isn't some bug in your getView() implementation, perhaps related to caching views (e.g., view holder/view wrapper), that causes it to return the wrong view in this case. Also, how exactly are you deleting "222" from the Cursor? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.2 Published! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

