Reputation: 3351
Suppose that I have a main layout that has a ListView. This ListView has a custom cursor adapter. When my list change, is there anyway to know, in the main activity, if my list has been changed?. Inside my custom cursor I call to this.notifyDataSetChanged();. Is there any method that can I use to know when notifyDataSetChanged() has been called?.
Upvotes: 1
Views: 48
Reputation: 83527
You need to create a DataSetObserver and register it with your adapter by calling registerDataSetObserver().
p.s. I strongly suggest that you familiarize yourself with the Android API Reference. This is a great tool to help you find the classes and methods which are available in the Android API.
Upvotes: 1