Code example for DataSetObservable

0
 * 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 class CustomPagerAdapter { 
	private DataSetObservable mObservable = new DataSetObservable();
 
	public static final int POSITION_UNCHANGED = -1;
	public static final int POSITION_NONE = -2;
 
	private View mBehind;
	private View mContent;	
	private LayoutParams mContentParams;
 
	public void setBehind(View v) {
		mBehind = v;
	} 
 
	public void setContent(View v, LayoutParams params) {
		mContent = v;
		mContentParams = params;