Code example for ActionBar

Methods: setSelectedNavigationItem

     * trick.  Normally a tab host has a simple API for supplying a View or 
     * Intent that each tab will show.  This is not sufficient for switching 
     * between pages.  So instead we make the content part of the tab host 
     * 0dp high (it is not shown) and the TabsAdapter supplies its own dummy 
     * view to show as the tab content.  It listens to changes in tabs, and takes 
     * care of switch to the correct paged in the ViewPager whenever the selected 
     * tab changes. 
    public static class TabsAdapter extends FragmentPagerAdapter 
            implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
        private final Context mContext;
        private final ActionBar mActionBar;
        private final ViewPager mViewPager;
        private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>();
        static final class TabInfo { 
            private final Class<?> clss;
            private final Bundle args;
            private Fragment fragment;