title: Tab android content sometime gone or dissapear
body: <p>I'm working on android tab right now, i was wondering why sometime content of my tab is gone,,by default android initializing and create 2 first tab content, i check by print the log in console, and when i click the third tab it will attach and initialize,, and sometimes when i clicked back in first tab or second tab, my content is gone like invisible or something, here my code</p>
  
  <pre><code>        ViewPagerAdapter adapter = new ViewPagerAdapter(getActivity().getSupportFragmentManager());
          adapter.addFragment(ArticleFragment.newInstanceFeatured(1, ArticleFragment.FEATURED_LATEST), ArticleFragment.FEATURED_LATEST.toUpperCase());
          adapter.addFragment(ArticleFragment.newInstanceFeatured(1, ArticleFragment.FEATURED_POPULAR), ArticleFragment.FEATURED_POPULAR.toUpperCase());
          adapter.addFragment(ArticleFragment.newInstanceFeatured(1, ArticleFragment.FEATURED_TRENDING), ArticleFragment.FEATURED_TRENDING.toUpperCase());
  
          // Set up the ViewPager with the sections adapter.
          viewPager = (ViewPager) getActivity().findViewById(R.id.viewpager);
          viewPager.setAdapter(adapter);
  
          tabLayout = (TabLayout) getActivity().findViewById(R.id.tabs);
          tabLayout.setupWithViewPager(viewPager);
  </code></pre>
  
  <p>here my adapter for the tab content</p>
  
  <pre><code>    class ViewPagerAdapter extends FragmentPagerAdapter {
          private final List&lt;Fragment&gt; mFragmentList = new ArrayList&lt;&gt;();
          private final List&lt;String&gt; mFragmentTitleList = new ArrayList&lt;&gt;();
  
          public ViewPagerAdapter(FragmentManager manager) {
              super(manager);
          }
  
          @Override
          public Fragment getItem(int position) {
              return mFragmentList.get(position);
          }
  
          @Override
          public int getCount() {
              return mFragmentList.size();
          }
  
          public void addFragment(Fragment fragment, String title) {
              mFragmentList.add(fragment);
              mFragmentTitleList.add(title);
          }
  
          @Override
          public CharSequence getPageTitle(int position) {
              return mFragmentTitleList.get(position);
          }
      }
  </code></pre>
  
  <p>I have <strong>Latest</strong>, <strong>Popular</strong>, and <strong>Trending</strong> Tab, each tab contain recyclerview, i retrieve data from my API and put them on it.., i know my code is working perfectly i completely success to retrieve and set the list but sometime if I change tab from one to another it happen, like  the content gone or missing or something, I implement swipe refresh too, sometime i try to swipe to refreshing the data and the Recycler view back and sometime it given null value... i have no idea what i gonna do, i think it work in the process but i don't know why.. please if you have same experience i would love to hear it.. thanks...</p>