How to know Fragment id for the fragment(s) provided by the tabbed activity template
问题 I have used the tabbed activity template provided by android studio but i can't happen to find the id for the different fragments used. the template had only one .xml and .java for all three fragments. I made a few changes and made three separate .xml and .java for the three fragments. But I can't figure out how to set the id for the different fragments either from .xml or in .java and without the id I can't perform inter fragment communication. 回答1: Now for retrieving a fragment Fragment f =