Below is my code which has 3 Fragment classes each embedded with each of the 3 tabs on ViewPager. I have a menu option. As shown in the onOpt
FragmentStatePagerAdapter has public method with the name instantiateItem that return your fragment based on specified parameter values, this method has two parameters ViewGroup (ViewPager) and position.
public Object instantiateItem(ViewGroup container, int position);
Used this method to get specified position's fragment,
Fragment fragment = (Fragment) adaper.instantiateItem(mViewPager, position);