I saved the fragment object using Streets Of Boston's answer here
And pulled out a fragment
Fragment fragment = myPagerAdapter.getRegisteredFragments(nowPosition);
if (fragment == null)
{
return;
}
but i'm can not access the public methods from fragment object fragment .
this method is in a fragment
public void dowork()
{
//WORK!
}
public static void dowork2()
{
//WORK!
}
fragment.dowork(); -> dowork is not found
fragment.dowork2(); -> dowork2 is not found
How can access?
thanks.