Code example for FragmentPagerAdapter

Methods: getSupportFragmentManager

0
	public class pageradapter extends FragmentPagerAdapter 
	{ 
		final int PAGE_COUNT = 5;
		public pageradapter() 
		{ 
			super(getSupportFragmentManager()); 
		} 
		@Override 
		public Fragment getItem(int position) 
		{ 
			return PageFragment.create(position+1);
		} 
		@Override 
		public int getCount()  
		{ 
			return PAGE_COUNT;
		} 
		public CharSequence getPageTitle(int position)
		{ 
			return "Page: " + (position+1); 
		}