Code example for ActionBar.Tab

Methods: getTag

0
 
	} 
 
	@Override 
	public void onTabSelected(Tab tab, FragmentTransaction ft) {
		switch ((Integer) tab.getTag()) {
		case TAGS:
			Log.d(TAG, "标签 Tab 被选中");
			mFragment.fillContentAsTagIndex();
			break; 
		case SUBJECTS:
			Log.d(TAG, "年级/科目 Tab 被选中");
			mFragment.fillContentAsGradeIndex();
			break; 
		} 
	} 
 
	@Override 
	public void onTabUnselected(Tab tab, FragmentTransaction ft) {
 
	}