Code example for FragmentStatePagerAdapter

Methods: getItem

0
			return Story.fromCursor(stories);
		} 
	} 
	 
	public void setTextSize(float textSize) {
		((ReadingItemFragment) getItem(currentPosition)).changeTextSize(textSize);
	} 
	 
	@Override 
	public int getItemPosition(Object object) {
		if (object instanceof LoadingFragment) {
			return POSITION_NONE; 
		} else { 
			return POSITION_UNCHANGED; 
		} 
	} 
 
	public void setCurrentItem(int passedPosition) {
		this.currentPosition = passedPosition;
	}