I\'m defining an ID for my fragment in the xml layout:
Use the tag as a container in your layout file. Later to replace the fragments from your activity dynamically, you can use the ID of the container to replace the fragments in your activity.