ptg7068951
356 HOUR 24:Writing Android Apps
The project appears in the Eclipse Package Explorer, as does the
SalutonMondo project. To avoid confusion, you should close SalutonMondo
before proceeding. Right-click SalutonMondoin the Package Explorer, and
then choose Close Project from the pop-up menu.
Organizing Resources
Creating an Android app requires Java programming, but a lot of the work
is done in the Eclipse interface. When you are fully versed in the capabili-
ties of the Android SDK, you can accomplish a great deal without writing
a single line of Java code.
One thing you do without programming is create resources that will be
used by the app. Every new Android project starts out with several folders
where resources are placed. To see these folders, expand the Leaderfolder
in the Package Explorer, and then expand the /resfolder and all of its sub-
folders (as shown in Figure 24.10).
TIP
This project covers a lot of
ground. As you work through it,
you’ll find it handy to keep a
browser open to the Android
Developer site’s reference sec-
tion at http://developer.
android.com/reference. You can
search for the Java classes in
the Android class library and
the filenames of the files in the
project to learn more.
FIGURE 24.10
Examining an app’s resource
folders.
Resources consist of graphics in the PNG, JPG, or GIF format, strings
stored in a file called strings.xml, user interface layout files in XMLfor-
mat, and other files you can create. Two you add often to projects are
colors.xmlfor colors used in the app and dimens.xmlfor dimensional
measurements that set text size and other things that are displayed.