Code example for FragmentActivity

1
 * Mock Activity to demonstrate the basic fragment based navigation using tabs. 
 *  
 * @author Sascha Moecker 
 *  
 */ 
public class MockSlidingTabActivity extends FragmentActivity { 
 
	private MockSectionsPagerAdapter mSectionsPagerAdapter; 
	private ViewPager mViewPager; 
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState); 
		setContentView(R.layout.activity_mocksslidingtab); 
 
		mSectionsPagerAdapter = new MockSectionsPagerAdapter(this, 
				getSupportFragmentManager()); 
 
		mViewPager = (ViewPager) findViewById(R.id.pager); 
		mViewPager.setAdapter(mSectionsPagerAdapter); 
	}