Code example for DataSetObservable

Methods: notifyChanged

0
 
	private DataSetObserver datasetObserver = new DataSetObserver() {
		public void onChanged() { 
			cachedCount = -1; 
			internalObservable.notifyChanged(); 
			regularObservable.notifyChanged(); 
		}; 
 
		public void onInvalidated() { 
			cachedCount = -1; 
			internalObservable.notifyInvalidated(); 
			regularObservable.notifyInvalidated(); 
		}; 
	}; 
 
	StickyListHeadersAdapterWrapper(Context context,
			StickyListHeadersAdapter delegate) {
		this.context = context;
		this.delegate = delegate;
		delegate.registerDataSetObserver(datasetObserver);
	}