When using the FragmentStatePageAdapter I get the fragments like this:
@Override
public Fragment getItem(int position) {
return
I tried Frank's answer that suggests Second Approach from the tutorial linked in it, bot for some reason after adding method getFragment() to my ViewPagerAdapter I can't access it via mViewPager.getAdapter.getFragment() as if it doesn't exist, so I moved mPageReferenceMap declaration from the ViewPagerAdapter to the enclosing class so it is easily accessed from any point of the enclosing class (in my case it is MainActivity's callback method from other fragment) which finally makes it possible to pass data between fragments. Thanks to Frank and feel free to implement my fixture if you like me face issue with accessing custom getFragment method.