title: ViewPager of Fragment does not show its content when the root Fragment is replaced again
body: <p>i'm implementing the <code>fragment screen</code> that contains <code>root view pager</code> which contains <code>child fragment</code> and the first of <code>child fragment</code> has a <code>view pager</code> which shows images.</p>
  
  <p>it is shown pretty good at first time, but when the <code>fragment</code> which contains <code>root view pager</code> is removed and replaced again (with new keyword for <code>fragment screen</code>), <code>roow view pager</code> doesn't show <code>child fragment</code>.</p>
  
  <p>here is the portion of my source.</p>
  
  <pre><code>    @AfterViews // this is the method of fragment screen
      protected void afterViews() {
          api(HotelDetailAPI.class).getProduct("hotels", getArguments().getInt("itemId"), new Callback&lt;Hotel&gt;(this) {
              @Override
              public void success(Hotel _hotel, Response response) {
                  hotel = _hotel;
                  HotelDetailPagerAdapter adapter = new HotelDetailPagerAdapter(getFragmentManager());
                  contentViewPager.setAdapter(adapter);
                  contentViewPager.setBackgroundColor(0xffffff);
                  super.success(hotel, response);
              }
  
              @Override
              public void failure(RetrofitError error) {
                  super.failure(error);
                  LOG.error("failed");
              }
          });
      }
  
  
  private class HotelDetailPagerAdapter extends FragmentPagerAdapter {
          List&lt;Fragment&gt; fragments = new ArrayList&lt;&gt;();
  
          public HotelDetailPagerAdapter(FragmentManager fm) {
              super(fm);
              Bundle data = new Bundle();
              data.putSerializable("hotel", hotel);
              Fragment fragment1 = new HotelDetailReservationFragment_();
              Fragment fragment2 = new HotelDetailReservationFragment_();
              Fragment fragment3 = new HotelDetailReservationFragment_();
              fragment1.setArguments(data);
              fragment2.setArguments(data);
              fragment3.setArguments(data);
              fragments.add(fragment1);
              fragments.add(fragment2);
              fragments.add(fragment3);
          }
  
          @Override
          public Fragment getItem(int position) {
              return fragments.get(position);
          }
  
          @Override
          public int getCount() {
              return 3;
          }
      }
  
  
  // this is the first fragment of root view pager it's not shown again.
  @EFragment(R.layout.fragment_hotel_detail_reservation)
  public class HotelDetailReservationFragment extends BaseFragment {
      private Hotel hotel;
  
      @AfterViews
      public void afterViews() {
          hotel = (Hotel)getArguments().getSerializable("hotel");
          FragmentTransaction ft = getBaseActivity().getFragmentManager().beginTransaction();
          Fragment fragment = new ImageSliderFragment_();
          Bundle data = new Bundle();
          data.putStringArray("images", hotel.getImages());
          fragment.setArguments(data);
          ft.add(R.id.hotel_detail_image_slider_container, fragment);
          ft.commit();
      }
  }
  </code></pre>
  
  <p>note that <code>fragment screen</code> is popped from back stack when the user presses back button, and if the user is clicked item again, new instance of <code>fragment screen is replaced</code>
  what's wrong with them?</p>