Resource Reference Syntax

Irrespective of the type of resource, all Android resources are identified (or referenced) by their id in Java source code. The syntax you use to allocate an id to a resource in the XML file is called resource-reference syntax. The id attribute syntax in the previous example @+id/text1 has the following formal structure:

@[package:]type/name

The type corresponds to one of the resource-type namespaces available in R.java, such as the following:

0 0

Post a comment