Code example for ActionBar

Methods: setSelectedNavigationItem

0
        public int getCount() { 
            return mTabs.size();
        } 
 
        @Override 
        public Fragment getItem(int position) {
            TabInfo info = mTabs.get(position);
            return Fragment.instantiate(mContext, info.clss.getName(), info.args);
        } 
 
        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
        } 
 
        public void onPageSelected(int position) {
            mActionBar.setSelectedNavigationItem(position);
        } 
 
        public void onPageScrollStateChanged(int state) {
        } 
 
        public void onTabSelected(Tab tab, FragmentTransaction ft) {