Color value

Value is a color, using web-style syntax, as describe above. Has only one attribute: • name - The name used in referring to this color.

Example XML Declaration

The following code declares two colors, the first fully opaque, and the second translucent.

<resources>

<color name=

"opaque red">#f00</color>

<color name=

"translucent red">#8 0ff0000</color>

</resources>

Example XML code

<TextView android

layout width="fill parent"

android

layout height="wrap content"

android

textAlign="center"

android

textColor="@color/translucent red"

android

text="Some Text"/>

0 0

Post a comment