Access Parent Fragment method from Child Fragment
问题 I'm trying to access from Map Fragment to myfunction() situed in the Parent Fragment Tabs . I tried the following line Tabs parentFragment = (Tabs) getParentFragment(); however parentFragment is null. I read all topics concerning this subjects but none of them helped me... (after maybe I misunderstood them). I have the following files : The Fragment from which I want to call the Parent method. public class Map extends Fragment { View rootView; @Override public View onCreateView(LayoutInflater