In This Chapter
Knowing why resources are important in Android
Working with image resources
Resources are mentioned in detail throughout this book, so you might wonder why an entire chapter is devoted to them. Discussing resources and their use in Chapters 3 and 4 is necessary to help you understand the basic structure of the resource directory and the use of resources to build a simple application. One compelling reason to use resources in your application — localization — is covered in this chapter.
Resources are additional static content that are an intrinsic part of your app but aren’t part of your Java code. The most common resources are
Earlier chapters in this book introduce you to layouts, strings, and images because they’re the most common types of resources that you use in everyday Android application development. The remaining resources may need some explanation, so the following few sections will clear them up.
In an Android resource, a dimension is a number followed by a unit of measurement, such as 10px, ...