3.7 Reviewing the Layout and Resource Files
Before moving on to the next step, we are going to look at some of the internal aspects of user interface design and resource handling. In the previous section, we made some changes to the user interface by modifying the activity_main.xml file using the Layout Editor tool. In fact, all that the Layout Editor was doing was providing a user-friendly way to edit the underlying XML content of the file. In practice, there is no reason why you cannot modify the XML directly in order to make user interface changes and, in some instances, this may actually be quicker than using the Layout Editor tool. In the top right-hand corner of the Layout Editor panel are three buttons as highlighted in Figure 3-18 below:
Figure 3-19
By default, the editor will be in Design mode whereby just the visual representation of the layout is displayed. The left-most button will switch to Code mode to display the XML for the layout, while the middle button...