30.3 Creating the First Fragment Layout
The next step is to create the user interface for the first fragment that will be used within our activity.
This user interface will, of course, reside in an XML layout file so begin by navigating to the layout folder located under app -> res in the Project tool window. Once located, right-click on the layout entry and select the New -> Layout resource file menu option as illustrated in Figure 30-1:
Figure 30-1
In the resulting dialog, name the layout toolbar_fragment and change the root element to RelativeLayout before clicking on OK to create the new resource file.
The new resource file will appear within the Layout Editor tool ready to be designed. Switch the Layout Editor to Text mode and modify the XML so that it reads as outlined in the following listing to add three new view elements to the layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
...