Пример #1
0
  private void initViewPager(final int pagers) {
    viewPager.setAdapter(adapter);
    viewPager.setOnPageChangeListener(this);

    // 内容填充好,默认显示第一页
    int defSelectedTab = GLConst.NONE;
    viewPager.setCurrentItem(defSelectedTab);
    viewPager.setOffscreenPageLimit(4);
  }
Пример #2
0
 public void setShowPager(int position) {
   viewPager.setCurrentItem(position);
   setNavTitle(mTitles[position]);
 }