Code example for DataSetObservable

0
import android.view.LayoutInflater; 
import android.view.View; 
import android.view.ViewGroup; 
 
public class ObjectAdapter<T> implements StatefulListAdapter { 
	private DataSetObservable observable = new DataSetObservable();
	private LayoutInflater inflater;
	protected List<T> elements;
	private int resourceId;
	private ObjectMapper<T> mapper;
	 
	public ObjectAdapter(LayoutInflater inflater, List<T> elements, int resourceId, ObjectMapper<T> mapper) {
		this.inflater = inflater;
		this.elements = elements;
		this.resourceId = resourceId;
		this.mapper = mapper;
	} 
 
	@Override 
	public boolean areAllItemsEnabled() { 
		return true;