ptg7068951
348 HOUR 24:Writing Android Apps
. default.properties—A build file generated by the Android Plug-in
that you should not edit.
. proguard.cfg—A configuration file for ProGuard, a tool that optimizes
an app and makes the source code harder for others to decompile.
These files and folders form the application framework. The first thing you
undertake as an Android programmer is to learn how to modify the frame-
work so you can discover what each component can accomplish.
There are additional files that are added to the framework to suit specific
purposes.
Creating an App
Although you haven’t done anything to it yet, you could successfully run
the new Android project. The framework functions as a working app.
Because there’s no fun in that, you customize the SalutonMondo app to
offer the traditional computer programming greeting “Saluton Mondo!”
In Hour 2, “Writing Your First Program,” you displayed the text “Saluton
Mondo!” as a string by calling the method System.out.println().
Android apps display strings that have been stored first in a resource file
called strings.xml. You can find this file in the /res/valuesfolder.
Use the Package Explorer to navigate to this folder. Double-click
strings.xml. A Resources editor opens, as shown in Figure 24.3.
strings.xml
FIGURE 24.3
Editing an Android app’s string
resources.