O'Reilly logo

Android App Development For Dummies, 3rd Edition by Michael Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6

Understanding Android Resources

In This Chapter

arrow Knowing why resources are important in Android

arrow Extracting resources

arrow 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.

Understanding Resources

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

  • Layout
  • String
  • Image
  • Dimension
  • Style
  • Theme
  • Value
  • Menu
  • Color

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.

Dimensions

In an Android resource, a dimension is a number followed by a unit of measurement, such as 10px, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required