I have multiple instances of a fragment that are inflated from an xml file, with an id assigned there that I had hoped to use as a container root. If I want to attach a sub-fragment to one of these fragments as my container, how do I know which one is used, or better yet how do I select a particular container fragment? Specifically, I want to be able to attach a fragment to one of a set of pages in a ViewPager, each of which is an instance of a common fragment definition. Any one of these pages could serve as the root for the sub-fragment. However, they'll all end up with the same id since it's specified in the XML, and you can't call FragmentTransaction#add using a fragment tag name...