title: How to disable recreation of the first Fragment in FragmentPagerAdapter on tab Selected?
body: <p><code>onCreateView</code> for my first fragment in the FragmentPagerAdapter is not very quick.
  So, changing curent tab to the first has a delay. </p>
  
  <p>How to disable recreate first Fragment in FragmentPagerAdapter on tab Selected?</p>
  
  <pre><code>private class TabsAdapter extends FragmentPagerAdapter implements ViewPager.OnPageChangeListener, ActionBar.TabListener {
      private final Context context;
      private ActionBar bar;
      private final ViewPager viewPager;
      private final ArrayList&lt;TabInfo&gt; tabs = new ArrayList&lt;TabInfo&gt;();
  
      final class TabInfo {
          private final Class&lt;?&gt; clss;
          private final Bundle args;
  
          TabInfo(Class&lt;?&gt; _class, Bundle _args) {
              clss = _class;
              args = _args;
          }
      }
  
      TabsAdapter(SherlockFragmentActivity activity, ViewPager pager) {
          super(activity.getSupportFragmentManager());
          context = activity;
          bar = activity.getSupportActionBar();
          viewPager = pager;
          viewPager.setAdapter(this);
          viewPager.setOnPageChangeListener(this);
      }
  
      public void addTab(ActionBar.Tab tab, Class&lt;?&gt; clss, Bundle args) {
          TabInfo info = new TabInfo(clss, args);
          tab.setTag(info);
          tab.setTabListener(this);
          tabs.add(info);
          bar.addTab(tab);
          notifyDataSetChanged();
      }
  
      @Override
      public int getCount() {
          return tabs.size();
      }
  
      @Override
      public Fragment getItem(int position) {
          TabInfo info = tabs.get(position);
          Fragment fragment = Fragment.instantiate(context, info.clss.getName(), info.args);
          return fragment;
      }
  
      @Override
      public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {}
      @Override
      public void onPageScrollStateChanged(int state) {}
  
      @Override
      public void onPageSelected(int position) {
          bar.setSelectedNavigationItem(position);
      }
  
      @Override
      public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
          Object tag = tab.getTag();
          for (int i = 0; i &lt; tabs.size(); i++) {
              if (tabs.get(i) == tag) 
                  viewPager.setCurrentItem(i);
          }
      }
  
      @Override
      public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {}
      @Override
      public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {}
  }
  </code></pre>