Skip to content Skip to sidebar Skip to footer

How Can I Find Last Fragment In The Mainactivity

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 know how I can access the last f

Solution 1:

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 .

Post a Comment for "How Can I Find Last Fragment In The Mainactivity"