PagerAdapter start position

前端 未结 9 1113

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:55

    I've found a way to set it's position, which is done outside of the class:

     awesomePager = (ViewPager) findViewById(R.id.awesomepager);
     awesomePager.setAdapter(awesomeAdapter);
     awesomePager.setCurrentItem(CurrentPosition);
    

    and it can be limited by calculating the amount of items I want to fit in to it

提交回复
热议问题