ptg7068951
Creating an Android App 347
you add depending on the capabilities of the app, but these starting files
and folders always must be present.
Figure 24.2 shows the Eclipse Package Explorer after a new Android proj-
ect has been created.
Package Explorer
FIGURE 24.2
Viewing the parts of an Android
project.
You can use the folder to explorethe file and folder structure of the project.
The new SalutonMondo app starts out with the following components:
. /srcfolder—The root folder for the app’s Java source code.
. /src/org.cadenhead.android/SalutonActivity.java—The class
for the activity that launches by default when the app is run.
. /genfolder—The folder for generated Java source code you do not
edit manually.
. /gen/org.cadenhead.android/R.java—The automatically generated
resource management source code for the app. (Never edit this!)
. /assets—The folder for file resources that will not be compiled into
the app.
. /res—The folder for application resources such as strings, numbers,
layout files, graphics and animation. There are subfolders for specific
resource types: layout, values, drawable-hdpi, drawable-ldpi, and
drawable-mdpi. These folders contain five resource files: three ver-
sions of icon.png, main.xmland strings.xml.
. AndroidManifest.xml—The app’s primary configuration file.