Method to add a new fragment in the layout.