Книга: Beginning Android

The Resource Lineup

The Resource Lineup

Resources are stored as files under the res/ directory in your Android project layout. With the exception of raw resources (res/raw/), all the other types of resources are parsed for you, either by the Android packaging system or by the Android system on the device or emulator. For example, when you lay out an activity’s UI via a layout resource (res/layout/), you do not have to parse the layout XML yourself — Android handles that for you.

In addition to layout resources (first seen in Chapter 5) and raw resources (introduced in Chapter 18), there are several other types of resources available to you, including:

• Animations (res/anim/), designed for short clips as part of a user interface, such as an animation suggesting the turning of a page when a button is clicked

• Images (res/drawable), for putting static icons or other pictures in an user interface

• Strings, colors, arrays, and dimensions (res/values/), to both give these sorts of constants symbolic names and to keep them separate from the rest of the code (e.g., for internationalization and localization)

• XML (res/xml/), for static XML files containing your own data and structure

Оглавление книги

Генерация: 1.107. Запросов К БД/Cache: 3 / 1
Вверх Вниз