Understanding Resources

Resources are critical to the Android architecture. In this section, you'll learn what resources are and how to create them using resource files. You'll find out that resources are declarative, and that Android creates resource IDs for convenient use in your Java programs. You'll also see how the R.java source file mediates the generation and usage of these resource IDs. Then you'll learn how to define resources in XML files, reuse resources in other resource XML definitions, and reuse resources in Java programs. In addition to these XML-based resources, this chapter also covers two other types of resources: raw resources and assets.

0 0

Post a comment