title: Using SectionsPagerAdapter android
body: <p>I have a sectionsPagerAdapter that is used as the adapter for a ViewPager.</p>
  
  <pre><code>    mSectionsPagerAdapter = new SectionsPagerAdapter(
              getSupportFragmentManager());
  
      // Set up the ViewPager with the sections adapter.
      mViewPager = (ViewPager) findViewById(R.id.pager);
      mViewPager.setAdapter(mSectionsPagerAdapter);
  </code></pre>
  
  <p>I have 3 fragments and  I want to switch between 2 fragments when  a button is clicked?</p>