6.4 Building the GUI and Resource Files
In this section, you’ll create the app’s resource files, GUI layout files and classes.
6.4.1 Creating the Project
For this app, you’ll add a Fragment
and its layout manually—much of the autogenerated code in the Blank Activity template with a Fragment
is not needed in the Cannon Game. Create a new project using the Empty Activity template. In the Create New Project dialog’s New Project step, specify
Application name:
Cannon Game
Company Domain:
deitel.com
(or specify your own domain name)
In the layout editor, select Nexus 6 from the virtual-device drop-down list (Fig. 2.11). Once again, we’ll use this device as the basis for our design. Also, delete the Hello world! TextView
from activity_main.xml
Get Android How to Program, 3/e 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.