I added a fragment inside an activity by using the following code:
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
ft.replace(R.id.parent_fragment_container, new FolderStructureFragment());
ft.commit();
My question is how can I get the reference of the added fragment. I have searched a lot of key words related to fragment and FragmentTransaction but didn't find anything close to my requirement which I think is a very basic function and should be offered to us. Any help is much appreciated!