A style resource defines the format and look for a UI.
A style can be applied to an individual
View (from within a layout file) or to
Activity or application (from within the manifest file).
For more information about creating and applying styles, please read Styles and Themes.
Note: A style is a simple resource that is referenced
using the value provided in the
name attribute (not the name of the XML file). As
such, you can combine style resources with other simple resources in the one XML file,
- file location:
The filename is arbitrary. The element's
namewill be used as the resource ID.
- resource reference:
- Required. This must be the root node.
- Defines a single style. Contains
- String. Required. A name for the style, which is used as the resource ID to apply the style to a View, Activity, or application.
- Style resource. Reference to a style from which this style should inherit style properties.
- Defines a single property for the style. Must be a child of a
- Attribute resource. Required. The name of the style property
to be defined, with a package prefix if necessary (for example