Code example for FragmentStatePagerAdapter

Methods: setPrimaryItem

2
		return ImageListFragment.newInstance(repo, imageList.get(position), optim);
	} 
 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		super.setPrimaryItem(container, position, object);
		setCurrentItem((ImageListFragment) object);
	} 
 
	/** 
	 * Getter for current item 
	 *  
	 * @return 
	 */ 
	public ImageListFragment getCurrentItem() { 
		return currentItem;
	} 
 
	/** 
	 * Setter for current item 
	 *