Code example for ActionBar.Tab

Methods: getPosition

0
	@Override 
	public void onTabSelected(Tab tab, FragmentTransaction ft) {
		Fragment f = null;
		TabFragment tf = null;
		 
		if (fragList.size() > tab.getPosition())
				fragList.get(tab.getPosition());
		 
		if (f == null) {
			tf = new TabFragment();
			Bundle data = new Bundle();
			data.putInt("idx",  tab.getPosition());
			tf.setArguments(data);
			fragList.add(tf);
		} 
		else 
			tf = (TabFragment) f;
		 
		ft.replace(android.R.id.content, tf);
		 
Connect your IDE to all the code out there  Get Codota for Java