CHAPTER 3. TEST DRIVE: HELLO WORLD APP
Figure 3.8. Default folder and file structure of an Android project The media, image and layout files residing in the resources folder are accessed via Java code written in MainActivity.java as we‟ll see in a while.
3.5. Building the User Interface Android Studio provides an easy way of designing user interfaces. The file named “activity_main.xml” located under the “res/layout” folder contains all the layout information of the current activity. If we try to open an .xml file outside of Android Studio, it is opened by a text editor or a browser. However, when we open an .xml file in Android Studio, it reads the .xml file and shows the corresponding activity layout with its components. In order to open the activity_main.xml in Android Studio, please double-click on it in the project explorer and the activity layout will be displayed in the middle pane as shown below:
31