You can implement callback, after the notifyDataSetChanged()
it will be called and do the job you need. It means the data has been loaded to the adapter and at next draw cycle will be visible on the GUI. This mechanism is built-in in Android. See DataSetObserver.
Implement his callback and register it into the list adapter, don't forget to unregister it, whenevr you no longer need it.
/**
* @see android.widget.ListAdapter#setAdapter(ListAdapter)
*/
@Override
public void setAdapter(android.widget.ListAdapter adapter) {
super.setAdapter(adapter);
adapter.registerDataSetObserver(new DataSetObserver() {
@Override
public void onChanged() {
onListChanged();
// ... or do something else here...
super.onChanged();
}
});
}