O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

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

Understanding Resources

Resources play a key role in Android architecture. A resource in Android is a file (like a music file or a file that describes the layout for a window) or a value (like the title of a dialog box) that is bound to an executable application. These files and values are bound to the executable in such a way that you can change them or provide alternatives without recompiling the application.

Familiar examples of resources include strings, colors, bitmaps, and layouts. Instead of hard-coding strings in an application, resources allow you to use their IDs instead. This indirection lets you change the text of the string resource without changing the source code.

There are many, many resource types in Android. Let's start this ...

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