How to get the current fragment displayed in a specific tab of a viewpager?
问题 I want to get the last fragment in the backstack, or the current displayed it's the same for me, in the tab b_1 . As you can see in the following image, I have a ViewPager, and another one inner tab b . Thus there are four current fragments displayed. Question : How can I get the Fragment 2 instance? I have seen another solutions, but none works for this scenario. Annotation: The fragment to return is not necessary the hosted in the ViewPager. I can have opened two more fragments in a tab.