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(); 
    } 
 
    @Override 
    public void onPageScrollStateChanged(int arg0) {
        updateAgendaFragment(); 
    } 
 
    @Override 
    public void onPageScrolled(int arg0, float arg1, int arg2) {
        updateAgendaFragment(); 
    }