> For the complete documentation index, see [llms.txt](https://android-course.cornellappdev.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://android-course.cornellappdev.com/archive/archived-native-android-textbook-pages/2.-views-and-layouts/2.6-resource-files.md).

# 1.2 Resource Files

Before ending the chapter, we ought to understand some of the other files laying around in the res folder. These are the resource files of our project, and Android resource files are split into these sub-categories:<br>

1. **Drawable** contains images and icons for app in the phone’s home screen.
2. **Font** contains custom font files
3. **Layout** contains XML files for all the layouts in the project
4. **Mipmap** contains icon images
5. **Raw** contains audio and video media
6. **Values** contains reusable values for colors, dimens, strings, and styles

\
For the most part, these resource files will remain empty until you start populating them with information, and it is generally good practice to move resources into the resource file if that resource going to be used multiple times. Along the same line, it’s good practice to move commonly used values into the resource files so that if the design of the app changes, you won’t have to go through every XML and class file to change the values. &#x20;

For example, in order to avoid having to remember specific color codes, you can specify them in the `colors.xml` file. Now the color can be referenced by its string name.&#x20;

{% code title="colors.xml" %}

```markup
<resources>
  <color name="colorPrimary">#008577</color>
  <color name="colorPrimaryDark">#00574B</color>
  <color name="colorAccent">#D81B60</color>
</resources>
```

{% endcode %}

You would refer to the colors in the XML file like so:

```markup
android:background="@color/colorPrimary"
```

This way, if the designer decides to change up the color scheme of the app, you would only have to change three values.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://android-course.cornellappdev.com/archive/archived-native-android-textbook-pages/2.-views-and-layouts/2.6-resource-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
