Code example for ActionBar.Tab

Methods: getTag

0
        public void onPageScrollStateChanged(int state) {
        } 
 
        @Override 
        public void onTabReselected(Tab tab, android.app.FragmentTransaction ft) {
            TabInfo info = (TabInfo) tab.getTag();
        } 
 
        @Override 
        public void onTabSelected(Tab tab, android.app.FragmentTransaction ft) {
            TabInfo info = (TabInfo) tab.getTag();
            for (int i = 0; i < mTabs.size(); i++) {
                if (mTabs.get(i) == info) {
                    mViewPager.setCurrentItem(i);
                } 
            } 
            info.fragment.show();
        } 
 
        @Override 
        public void onTabUnselected(Tab tab, android.app.FragmentTransaction ft) {