Code example for FragmentStatePagerAdapter

Methods: instantiateItem

0
			mContext = activity;
		} 
		 
		@Override 
		public Object instantiateItem(ViewGroup container, int position) {
			Fragment frag = (Fragment) super.instantiateItem(container, position);			
			return frag;
		} 
 
		@Override 
		public Fragment getItem(int pos) {
			return Fragment.instantiate(mContext, frags[pos]);
		} 
 
		@Override 
		public int getCount() { 
			return frags.length;
		} 
		 
		@Override 
		public CharSequence getPageTitle(int position) {