title: Fragment in ViewPager using FragmentPagerAdapter is blank the second time it is viewed
body: <p>I have a fragment interface with tabs along the bottom which open different fragments in the main view.</p>
  
  <p>I have one particular fragment which is a list of items.  If the user selects one of the items in this list, another fragment opens which contains a viewpager which scrolls horizontally between all of the items in the list in the previous fragment.  This works great.</p>
  
  <p>The viewpager uses a FragmentPagerAdapter to display the items.</p>
  
  <p>The problem comes when the user selects an item in the list, views it, then hits the button on the tab bar to go back to the list, then selects another item.  The second time an item is selected, a blank screen appears instead of the viewpager.  I receive no errors in my LogCat when this happens.</p>
  
  <p>Why is the viewpager only appearing the first time?</p>
  
  <p><code>FragmentPagerAdapter:</code></p>
  
  <pre><code>public class ViewPagerAdapter extends FragmentPagerAdapter {
      Cursor mCursor;
  
      public ViewPagerAdapter(FragmentManager fm, Cursor c) {
          super(fm);
          mCursor = c;
      }
  
      public void changeCursor(Cursor c) {
          mCursor = c;
          this.notifyDataSetChanged();
      }
  
      @Override
      public int getCount() {
          if (mCursor == null) return 0;
          else return mCursor.getCount();
      }
  
      @Override
      public Fragment getItem(int position) {
          mCursor.moveToPosition(position);
          return TeamCardFragment.newInstance(mCursor, position);
      }
  }
  </code></pre>
  
  <p><code>PagerFragment:</code></p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      Bundle bundle = getArguments();
      mCursorPosition = bundle.getInt(TeamCardCommon.BUNDLE_KEY_CURSOR_POSITION);
  
      View mView = inflater.inflate(R.layout.team_card_master, container, false);
      mViewPager = (ViewPager)mView.findViewById(R.id.team_card_master_view_pager);
  
      mAdapter = new ViewPagerAdapter(getFragmentManager(), cursor);
      new setAdapterTask().execute();
  
      return mView;
  }
  
  private class setAdapterTask extends AsyncTask&lt;Void, Void, Void&gt; {
      protected Void doInBackground(Void... params) {
          return null;
      }
  
      @Override
      protected void onPostExecute(Void result) {
          mViewPager.setAdapter(mAdapter);
          mViewPager.setCurrentItem(mCursorPosition);
      }
  }
  </code></pre>