title: Working with more than 1 fragment per Page on ViewPager
body: <p>I've always worked with <code>FragmentActivity</code> and <code>TabHost</code> to add/remove/replace <code>Fragment</code> programmatically.</p>
  
  <p>What I was using was:</p>
  
  <pre><code>public void addFragments(String tabName, Fragment fragment,
          boolean animate, boolean add, Bundle bundle) {
      currentSelectedTab = tabName;
  
      if (add) {
          hMapTabs.get(tabName).add(fragment);
      }
      FragmentManager manager = getSupportFragmentManager();
      FragmentTransaction ft = manager.beginTransaction();
      if (animate) {
          ft.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left);
      }
      if (bundle!=null){
          fragment.setArguments(bundle);
      }
      ft.replace(R.id.realtabcontent, fragment, tabName);
      ft.commitAllowingStateLoss();
  
  }
  
  public void removeFragment() {
      Fragment fragment = hMapTabs.get(currentSelectedTab).get(
              hMapTabs.get(currentSelectedTab).size() - 2);
      hMapTabs.get(currentSelectedTab).remove(
              hMapTabs.get(currentSelectedTab).size() - 1);
      FragmentManager manager = getSupportFragmentManager();
      FragmentTransaction ft = manager.beginTransaction();
      ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_right);
      ft.replace(R.id.realtabcontent, fragment);
      ft.commitAllowingStateLoss();
  }
  </code></pre>
  
  <p>With that, everything works OK.</p>
  
  <p>Now I'm trying to manage this Fragment's <strong>behavior</strong> on a page of my <code>ViewPager</code>.</p>
  
  <p>I've been searching on StackOverFlow for three hours and I get confused everytime more and more. Tried with public functions on <code>FragmentPagerAdapter</code> for example.</p>
  
  <p>And what only worked makes me a white blank screen on adding Fragments.</p>
  
  <p>How would you do it?</p>
  
  <p>Thanks in advance.</p>