Introduction
This topic includes a terminology list associated with resources, and a series
of examples of using resources in code. For a complete guide to the supported
Android resource types, see
Available Resources.
The Android resource system keeps track of all non-code
assets associated with an application. You use the
Resources class to access your
application's resources; the Resources instance associated with your
application can generally be found through
Context.getResources().
An application's resources are compiled into the application
binary at build time for you by the build system. To use a resource,
you must install it correctly in the source tree and build your
application. As part of the build process, symbols for each
of the resources are generated that you can use in your source
code -- this allows the compiler to verify that your application code matches
up with the resources you defined.
The rest of this section is organized as a tutorial on how to
use resources in an application.