How can i find last fragment in the mainActivity

前端 未结 1 1709
予麋鹿
予麋鹿 2021-01-21 06:04

I want to make my viewPager support Rtl, and set the current item on the last fragment, but when I write this code in my MainActivity.java, I don\'t kn

相关标签:
1条回答
  • 2021-01-21 06:32

    becuse i use :

    setCurrentItem(viewPagerAdapter.getCount());
    

    before the setting the adapter it's not working and i should write this code after the setting the adpter , thanks to Kevin Chris and K Neeraj Lal .

    0 讨论(0)
提交回复
热议问题