2.5. Building the App’s GUI with the Graphical Layout Editor

The IDE’s Graphical Layout editor allows you to build a GUI by dragging and dropping components—such as TextViews, ImageViews and Buttons—onto a design area. By default, the GUI layout for a Blank App’s MainActivity is stored in the XML file activity_main.xml, located in the project’s res folder in the layout subfolder. In this chapter, we’ll use the Graphical Layout editor and the Outline window to build the GUI and will not study the generated XML. The Android development tools have improved to the point that, in most cases, you do not need to manipulate the XML markup directly.

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.