PagerAdapter start position

前端 未结 9 1105

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 have an array of size more than 1000 and in dymanic viewpager I was facing leftswipe stuck on firstload. The below code solved this and resulted in smooth scroll:

    @Override
    onResume(){
       super.onResume();
       viewPager.setCurrentItem(newPosition);
    }
    

提交回复
热议问题