Code example for ActionBar.Tab

Methods: getPosition

0
			return mFragments.size();
		} 
 
		@Override 
		public void onTabSelected(Tab tab, FragmentTransaction ft) {
			mPager.setCurrentItem(tab.getPosition());
		} 
 
		public void onTabUnselected(Tab tab, FragmentTransaction ft) { }
		public void onTabReselected(Tab tab, FragmentTransaction ft) { }
		public void onPageScrollStateChanged(int arg0) { }
		public void onPageScrolled(int arg0, float arg1, int arg2) { }
 
		@Override 
		public void onPageSelected(int position) {
			mActionBar.setSelectedNavigationItem(position);
		} 
	} 
 
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {