title: first page of viewpager is not loading at all
body: <p>Hear is my <code>FragmentActivity</code> and after I run it my first tab is empty.</p>
  
  <pre><code>public class MainActivity extends FragmentActivity implements
      OnTabChangeListener, OnPageChangeListener {
  
  
  private TabHost mTabHost;
  private ViewPager mViewPager;
  private HashMap&lt;String, TabInfo&gt; mapTabInfo = new HashMap&lt;String, MainActivity.TabInfo&gt;();
  private PagerAdapter mPagerAdapter;
  private TabInfo mLastTab = null;
  
  private class TabInfo {
      private String tag;
      private Class clss;
      private Bundle args;
      private Fragment fragment;
  
      TabInfo(String tag, Class clazz, Bundle args) {
          this.tag = tag;
          this.clss = clazz;
          this.args = args;
      }
  
  }
  
  class TabFactory implements TabContentFactory {
  
      private final Context mContext;
  
      /**
       * @param context
       */
      public TabFactory(Context context) {
          mContext = context;
      }
  
      /**
       * (non-Javadoc)
       * 
       * @see android.widget.TabHost.TabContentFactory#createTabContent(java.lang.String)
       */
      public View createTabContent(String tag) {
          View v = new View(mContext);
          v.setMinimumWidth(0);
          v.setMinimumHeight(0);
          return v;
      }
  
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      this.requestWindowFeature(Window.FEATURE_NO_TITLE);
      Log.d("checking", "setup tabs...");
      setContentView(R.layout.activity_main);
      // //
      initialiseTabHost(savedInstanceState);
      if (savedInstanceState != null) {
          mTabHost.setCurrentTabByTag(savedInstanceState.getString("tab")); 
      }
      intialiseViewPager();
      // //
  
  }
  
  protected void onSaveInstanceState(Bundle outState) {
      outState.putString("tab", mTabHost.getCurrentTabTag()); // save the tab
                                                              // selected
      super.onSaveInstanceState(outState);
  }
  
  private void intialiseViewPager() {
  
      List&lt;Fragment&gt; fragments = new Vector&lt;Fragment&gt;();
      fragments
              .add(Fragment.instantiate(this, CoachFragment.class.getName()));
      fragments
              .add(Fragment.instantiate(this, LogingFragment.class.getName()));
      fragments.add(Fragment.instantiate(this,
              HistoryFragment.class.getName()));
      this.mPagerAdapter = new PagerAdapter(
              super.getSupportFragmentManager(), fragments);
      //
      this.mViewPager = (ViewPager) super.findViewById(R.id.viewpager);
      this.mViewPager.setAdapter(this.mPagerAdapter);
      this.mViewPager.setOnPageChangeListener(this);
  }
  
  private void initialiseTabHost(Bundle args) {
      mTabHost = (TabHost) findViewById(android.R.id.tabhost);
      mTabHost.setup();
      TabInfo tabInfo = null;
      View tabView1 = createTabView(this, "coach");
      MainActivity.AddTab(this, this.mTabHost, this.mTabHost
              .newTabSpec("Tab1").setIndicator(tabView1),
              (tabInfo = new TabInfo("Tab1", CoachFragment.class, args)));
      this.mapTabInfo.put(tabInfo.tag, tabInfo);
      View tabView2 = createTabView(this, "log book");
      MainActivity.AddTab(this, this.mTabHost, this.mTabHost
              .newTabSpec("Tab2").setIndicator(tabView2),
              (tabInfo = new TabInfo("Tab2", LogingFragment.class, args)));
      this.mapTabInfo.put(tabInfo.tag, tabInfo);
      View tabView3 = createTabView(this, "history");
      MainActivity.AddTab(this, this.mTabHost, this.mTabHost
              .newTabSpec("Tab3").setIndicator(tabView3),
              (tabInfo = new TabInfo("Tab3", HistoryFragment.class, args)));
      this.mapTabInfo.put(tabInfo.tag, tabInfo);
              mTabHost.setOnTabChangedListener(this);
  }
  
  private static void AddTab(MainActivity activity, TabHost tabHost,
          TabHost.TabSpec tabSpec, TabInfo tabInfo) {
      // Attach a Tab view factory to the spec
      tabSpec.setContent(activity.new TabFactory(activity));
      tabHost.addTab(tabSpec);
  }
  
  
  
  public void onTabChanged(String tag) {
      // TabInfo newTab = this.mapTabInfo.get(tag);
      int pos = this.mTabHost.getCurrentTab();
      this.mViewPager.setCurrentItem(pos);
  }
  
  private static View createTabView(final Context context, final String text) {
      View view = LayoutInflater.from(context)
              .inflate(R.layout.tabs_bg, null);
      TextView tv = (TextView) view.findViewById(R.id.tabsText);
      tv.setText(text);
      return view;
  }
  
  @Override
  public void onPageScrollStateChanged(int arg0) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void onPageScrolled(int arg0, float arg1, int arg2) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void onPageSelected(int position) {
      // TODO Auto-generated method stub
      this.mTabHost.setCurrentTab(position);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>hear is CoachFragment code:</p>
  
  <pre><code>public class CoachFragment extends Fragment implements AnimationListener {
  
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
      if (container == null) {
          return null;
      }
      return (LinearLayout)inflater.inflate(R.layout.coach_activity, container, false);
  }
  </code></pre>
  
  <p>other tow fragment are the same and I use the same layout file for all three, the other tow have no problem.</p>