When you first create a project, the IDE opens the app’s activity_main.xml
file in the Graphical Layout editor (Fig. 2.12). You can also double click the activity_main.xml
file in your app’s res/layout
folder to open the Graphical Layout editor.
Android devices can run on many types of devices. In this chapter, you’ll design an Android phone GUI. As we mentioned in the Before You Begin section, we use an AVD that emulates the Google Nexus 4 phone for this purpose. The Graphical Layout editor comes with many device configurations that represent various screen sizes and resolutions that you can use to design your GUI. For this chapter, we use the predefined Nexus 4, which we selected in the screen-type drop-down list in Fig. 2.12. This does not mean that the app can execute only on a Nexus 4 device—it simply means that the design is for devices similar in screen size and resolution to the Nexus 4. In later chapters, you’ll learn how to design your GUIs to scale appropriately for a wide range of devices.