title: why fragment doesn`t show up with ViewPagerIndicator
body: <p>I have a activity whose content view is a fragment, I added viewpager and viewpagerindicator to this activity. I created an FragmentPagerAdapter for the pager, the adapter constructs three fragments for displaying three tabs. But when I run the project, only see the pager title shows up. Why doesn`t the three fragments show up?</p>
  
  <p>I created the pager and indicator on create of the Activity lifecycle.</p>
  
  <pre><code>    public class BrowserActivity extends SherlockFragmentActivity
                          implements ReposFragment.OnFileSelectedListener, StarredFragment.OnStarredFileSelectedListener, OnBackStackChangedListener {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.seadroid_main);
      adapter = new SeafileTabsAdapter(getSupportFragmentManager());
  
      pager = (ViewPager) findViewById(R.id.pager);
      pager.setAdapter(adapter);
  
      TabPageIndicator indicator = (TabPageIndicator)findViewById(R.id.indicator);
      indicator.setViewPager(pager);
      indicator.setOnPageChangeListener(new OnPageChangeListener() {
          @Override
          public void onPageSelected(final int position) {
              currentPosition = position;
              supportInvalidateOptionsMenu();
              disableUpButton();
          }
  
          @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
          }
      });
  </code></pre>
  
  <p>the adapter constructs three fragments for displaying three tabs view</p>
  
  <pre><code>class SeafileTabsAdapter extends FragmentPagerAdapter implements
  IconPagerAdapter {
      public SeafileTabsAdapter(FragmentManager fm) {
          super(fm);
      }
  
      private ReposFragment reposFragment = null;
      private ActivitiesFragment activitieFragment = null;
      private StarredFragment starredFragment = null;
  
      @Override
      public Fragment getItem(int position) {
          switch (position) {
          case 0:
              if (reposFragment == null) {
                  reposFragment = new ReposFragment();
              }
              return reposFragment;
          case 1:
              if (starredFragment == null) {
                  starredFragment = new StarredFragment();
              }
              return starredFragment;
          case 2:
              if (activitieFragment == null) {
                  activitieFragment = new ActivitiesFragment();
              }
              return activitieFragment;
          default:
              return new Fragment();
          }
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          switch (position) {
          case 0:
              return getString(R.string.tabs_library).toUpperCase();
          case 1:
              return getString(R.string.tabs_starred).toUpperCase();
          case 2:
              return getString(R.string.tabs_activity).toUpperCase();
  
          default:
              return null;
          }
      }
  
      @Override
      public int getIconResId(int index) {
          return ICONS[index];
      }
  
      @Override
      public int getCount() {
          return ICONS.length;
      }
  }
  </code></pre>
  
  <p>the layout file seadroid_main.xml </p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/fragment_container"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;com.viewpagerindicator.TabPageIndicator
      android:id="@+id/indicator"
      android:layout_height="wrap_content"
      android:layout_width="match_parent"
      /&gt;
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/pager"
      android:layout_width="fill_parent"
      android:layout_height="0dp"
      android:layout_weight="1"
      /&gt;
  </code></pre>
  
  <p></p>
  
  <hr>
  
  <p><strong>UPDATE</strong><br>
  I have found that ViewPager tutorials used LineaLayout as the root container. So is it necessary to change FragmentLayout to be LineaLayout here. When I changed to LineaLayout, the app crashed, and the log is</p>
  
  <pre><code>    12-02 07:01:13.636: E/AndroidRuntime(3807): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.seafile.seadroid2/com.seafile.seadroid2.ui.activity.BrowserActivity}: android.view.InflateException: Binary XML file line #21: Error inflating class LineaLayout
  12-02 07:01:13.636: E/AndroidRuntime(3807):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
  </code></pre>