

Upon completion of these steps, the user interface layout should resemble that of Figure 37-2: Select the hardcoded text warning, click the Fix button and assign the string to a resource named change_text. Once the changes have been made, switch the Layout Editor tool back to Design mode and click on the warning button in the top right-hand corner of the design area. 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: The new resource file will appear within the Layout Editor tool ready to be designed. 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. Once located, right-click on the layout entry and select the New -> Layout resource file menu option as illustrated in Figure 37-1: 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. The next step is to create the user interface for the first fragment that will be used within our activity.
