page.title=Resource Types parent.title=Application Resources parent.link=index.html @jd:body

See also

  1. Providing Resources
  2. Accessing Resources

Each of the documents in this section describe the usage, format and syntax for a certain type of application resource that you can provide in your resources directory ({@code res/}).

Here's a brief summary of each resource type:

Animation Resources
Define pre-determined animations.
Tween animations are saved in {@code res/anim/} and accessed from the {@code R.anim} class.
Frame animations are saved in {@code res/drawable/} and accessed from the {@code R.drawable} class.
Color State List Resource
Define a color resources that changes based on the View state.
Saved in {@code res/color/} and accessed from the {@code R.color} class.
Drawable Resources
Define various graphics with bitmaps or XML.
Saved in {@code res/drawable/} and accessed from the {@code R.drawable} class.
Layout Resource
Define the layout for your application UI.
Saved in {@code res/layout/} and accessed from the {@code R.layout} class.
Menu Resource
Define the contents of your application menus.
Saved in {@code res/menu/} and accessed from the {@code R.menu} class.
String Resources
Define strings, string arrays, and plurals (and include string formatting and styling).
Saved in {@code res/values/} and accessed from the {@code R.string}, {@code R.array}, and {@code R.plurals} classes.
Style Resource
Define the look and format for UI elements.
Saved in {@code res/values/} and accessed from the {@code R.style} class.
More Resource Types
Define values such as booleans, integers, dimensions, colors, and other arrays.
Saved in {@code res/values/} but each accessed from unique {@code R} sub-classes (such as {@code R.bool}, {@code R.integer}, {@code R.dimen}, etc.).