title: I don't want to refresh fragment on change
body: <p>I have 3 fragments... with their 3 navigation tabs.</p>
  
  <p>The problem is that if i'm on the first tab, and i click the third.. when I click another time the first, it reloads all the fragment. If I click the second tab (in the middle) and I click the first, it doesn't reload.</p>
  
  <p>My objective is that I don't want to refresh my fragments never!</p>
  
  <p>How can I do it?</p>
  
  <p>My code is:</p>
  
  <pre><code>public class TabsPagerAdapter extends FragmentPagerAdapter {
  
      public TabsPagerAdapter(FragmentManager fm) {
          super(fm);
      }
  // Return Items
      @Override
      public Fragment getItem(int index) {
  
          switch (index) {
          case 0:
              return new Retos();
          case 1:
              return new Amics();
          case 2:
              return new Ranking();
          }
  
          return null;
      }
  
      @Override
      public int getCount() {
          // get item count - equal to number of tabs
          return 3;
      }
  
  }
  </code></pre>
  
  <p>And this    :</p>
  
  <pre><code>public class Perfil extends ActionBarActivity implements ActionBar.TabListener{
  
  private ViewPager viewPager;
  private TabsPagerAdapter mAdapter;
  private ActionBar actionBar;
  private SearchView mSearchView;
  private TextView mStatusView;
  // Tab titles
  private String[] tabs = { "TAB1", "TAB2", "TAB3" };
  
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.perfil);
  
  
      // Initilization
      viewPager = (ViewPager) findViewById(R.id.pager);
      actionBar = getSupportActionBar();
      mAdapter = new TabsPagerAdapter(getSupportFragmentManager());
  
      viewPager.setAdapter(mAdapter);
      actionBar.setHomeButtonEnabled(true);
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);    
  
  
      /** Creating fragment1 Tab */
      Tab tab = actionBar.newTab()
          .setText("TAB1")
          .setTabListener(this);
  
      actionBar.addTab(tab);
  
      /** Creating fragment2 Tab */
      tab = actionBar.newTab()
          .setText("TAB2")
          .setTabListener(this);
          //.setIcon(R.drawable.ic_action_group);
  
      actionBar.addTab(tab);
  
      /** Creating fragment3 Tab */
      tab = actionBar.newTab()
          .setText("TAB3")
          .setTabListener(this);
  
      actionBar.addTab(tab);
  
  
  
  
      /**
       * on swiping the viewpager make respective tab selected
       * */
      viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
  
          @Override
          public void onPageSelected(int position) {
              // on changing the page
              // make respected tab selected
              actionBar.setSelectedNavigationItem(position);
  
          }
  
          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {
          }
  
          @Override
          public void onPageScrollStateChanged(int arg0) {
          }
      });
  }
  
  
  @Override
  public void onTabReselected(Tab tab, FragmentTransaction ft) {
  }
  
  @Override
  public void onTabSelected(Tab tab, FragmentTransaction ft) {
      // on tab selected
      // show respected fragment view
      viewPager.setCurrentItem(tab.getPosition());
  }
  
  @Override
  public void onTabUnselected(Tab tab, FragmentTransaction ft) {
  }
  </code></pre>
  
  <p>}</p>