Resource types overview (original) (raw)
Resource types overview
Each page in this section describes the usage, format, and syntax for a certain type of app resourcethat you can provide in your project resources directory (res/).
Here's a brief summary of each page:
Define pre-determined animations.
Tween animations are saved in res/anim/ and accessed from the R.anim class.
Frame animations are saved in res/drawable/ and accessed from the R.drawable class.
Define a color resource that changes based on the View state.
Saved in res/color/ and accessed from the R.color class.
Define various graphics with bitmaps or XML.
Saved in res/drawable/ and accessed from the R.drawable class.
Define the layout for your application UI.
Saved in res/layout/ and accessed from the R.layout class.
Define the contents of your application menus.
Saved in res/menu/ and accessed from the R.menu class.
Define strings, string arrays, and plurals and include string formatting and styling.
Saved in res/values/ and accessed from the R.string, R.array, and R.plurals classes.
Define the look and format for UI elements.
Saved in res/values/ and accessed from the R.style class.
Define font families and include custom fonts in XML.
Saved in res/font/ and accessed from the R.font class.
Define other primitive values as static resources, including the following:
XML resource that carries a boolean value.
XML resource that carries a hexadecimal color value.
XML resource that carries a dimension value with a unit of measure.
XML resource that provides a unique identifier for application resources and components.
XML resource that carries an integer value.
XML resource that provides an array of integers.
XML resource that provides a [TypedArray](/reference/android/content/res/TypedArray), which you can use for an array of drawables.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.