title: Android ViewPager in Fragment not updating
body: <p>I have a Fragment for a ViewPager. The ViewPager is updated based on an action fired by the user. Well when the Fragment is recreated so to speak, the page of a ViewPager is not updated as should be, or even shown for that matter! When I swipe over to other pages and then back to that one, it loads?</p>
  
  <p>Here is the Fragment:</p>
  
  <pre><code>public static class CardFrontFragment extends Fragment { 
  
      public CardFrontFragment() {
  
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
  
          View rootView = null;
  
          rootView = inflater.inflate(R.layout.activity_dashboard, container, false);
  
          TextView    textviewLocation    = (TextView)rootView.findViewById(R.id.textview_location);
          TextView    textviewConditions  = (TextView)rootView.findViewById(R.id.textview_points);
          ViewPager   viewPagerDashboard  = (ViewPager)rootView.findViewById(R.id.viewPager_Dashboard);
  
          if(overviewData != null) {
  
              textviewLocation.setText(overviewData.getLocation());
              textviewPoints.setText(overviewData.getPoints());
  
              viewPagerDashboard.setAdapter(adapterSectionsPager);
              adapterSectionsPager.notifyDataSetChanged();
              viewPagerDashboard.destroyDrawingCache();
  
              textviewLocation.setText(overviewData.getWeathersLocation());
              textviewPoints.setText(overviewData.getWeathersConditions());
          }
  
          return rootView;
      }
  }
  </code></pre>
  
  <p>Here is the adapter:</p>
  
  <pre><code>public class SectionsPagerAdapter extends FragmentStatePagerAdapter {
  
      public SectionsPagerAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public android.support.v4.app.Fragment getItem(int position) {
          return DashboardSectionFragment.create
                  (uiContext, position, overviewData, forecastData, hourlyData, radarData);
      }
  
      @Override
      public int getCount() {
          // Show 4 total pages:
          return 4;
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          Locale l = Locale.getDefault();
          switch (position) {
          case 0:
  
              return getString(R.string.title_section_1).toUpperCase(l);
          case 1:
  
              return getString(R.string.title_section_2).toUpperCase(l);
          case 2:
  
              return getString(R.string.title_section_3).toUpperCase(l);
          case 3:
              // Radar Page:
              return getString(R.string.title_section_4).toUpperCase(l);
          }
          return null;
      }
  }
  </code></pre>
  
  <p>I heard I am extending the correct one FragmentStatePagerAdapter over FragmentPagerAdapter. Yet nothing is working. I have called many methods of the ViewPager and adapter in the Fragment when the ViewPager is recreated but it still does not load initially till it appears off screen then back on...</p>
  
  <p>Thanks! </p>