Code example for ActionBar.Tab

Methods: setTabListener, setText

0
		tab.setTabListener(tl);
		actionBar.addTab(tab);
 
		String label2 = "Challenges";
		tab = actionBar.newTab();
		tab.setText(label2);
		TabListener<ChallengesTab> tl2 = new TabListener<ChallengesTab>(this,
				label2, ChallengesTab.class);
		tab.setTabListener(tl2);
		actionBar.addTab(tab);
 
		 
	} 
	 
	public String getGroupName(){
		return this.groupname;
	} 
	class TabListener<T extends Fragment> implements ActionBar.TabListener {
		private Fragment mFragment;
		private final Activity mActivity;
		private final String mTag;