我的Activity中有几个fragment。我想要在这个Activity中访问在其中一个fragment创建的函数
Fragment:
public class RandomFragment extends Fragment {
public void randomfuntion (){
}
}
Activity:
public class Main extends FragmentActivity{
Fragment randomname;
public void anotherrandomfuntion (){
randomname. // I want to have access to randomfuntion
}
}