Code example for DataSetObservable

 * set change may involve pages being added, removed, or changing position. The 
 * ViewPager will keep the current page active provided the adapter implements 
 * the method {@link #getItemPosition(Object)}.</p> 
public abstract class PagerAdapter { 
    private DataSetObservable mObservable = new DataSetObservable();
    public static final int POSITION_UNCHANGED = -1;
    public static final int POSITION_NONE = -2;
     * Return the number of views available. 
    public abstract int getCount(); 
     * Called when a change in the shown pages is going to start being made. 
     * @param container The containing View which is displaying this adapter's 
     * page views.