Attributes

android:name

A unique name for the item. To ensure that the name is unique, use a Java-style naming convention — for example,

"com.example.project.activity.fred".

android:resource

A reference to a resource. The ID of the resource is the value assigned to the item. The ID can be retrieved from the meta-data Bundle by the Bundle.getlntO method.

android:value

The value assigned to the item. The data types that can be assigned as values and the Bundle methods that components use to retrieve those values are listed in the following table:

Type

Bundle method

String value, using double backslashes (\\) to escape characters — such as "\\n" and "\\uxxxxx" for a Unicode character.

KetStrinK()

Integer value, such as "100"

Retint()

Boolean value, either "true" or "false"

getBooiean()

Color value, in the form "#rgb", "#argb", "#rrggbb", or "#aarrggbb"

getString()

Float value, such as "1.23"

getFloat()

INTRODUCED IN: API Level 1

0 0

Post a comment