How to choose the middle page of the FragmentPagerAdapter?

I have to call the third page of the view-pager using the FragmentPagerAdapter, so I passed the value 3 of this activity to the fragment that loads the view-pager. But it brings up another page of the view page. Any solution would be appreciated.

+4
source share
1 answer

just use

mViewPager.setCurrentItem(2); 

if you want to go to the third page because the index starts at 0.

+17
source

Source: https://habr.com/ru/post/1489866/


All Articles