Code example for ActionBar.Tab

Methods: setTabListener, setTag

0
            mViewPager.setOnPageChangeListener(this);
        } 
 
        public void addTab(ActionBar.Tab tab, Class<?> clss, Bundle args) {
            TabInfo info = new TabInfo(clss, args);
            tab.setTag(info);
            tab.setTabListener(this);
            mTabs.add(info);
            mActionBar.addTab(tab);
            notifyDataSetChanged(); 
        } 
 
         
        public int getCount() { 
            return mTabs.size();
        } 
 
         
        public Fragment getItem(int position) {
            TabInfo info = mTabs.get(position);
            if (info.fragment == null) {