PagerAdapter start position

前端 未结 9 1197

I\'m using the following example to impliment my viewPager: http://code.google.com/p/viewpagerexample/issues/list

The problem with this example is that I can\'t figure o

9条回答
  •  野性不改
    2021-01-30 08:42

    I'm using 3 fragments and on starting my app, the second (middle) fragment will be shown by default. Just I'm using the onResume function and all works great.

    @Override
    protected void onResume() {
        super.onResume();
        m_viewPager.setCurrentItem(1);
    }
    

提交回复
热议问题