全部博文(413)
分类: 嵌入式
2010-10-11 13:57:01
点击(此处)折叠或打开
The at-symbol (@) at the beginning of the string indicates that the XML parser should parse and expand the rest
of the resource string and identify it as a resource.
To reference resourde in code, you must use the form "[package].r.type.name"
Generally, every resource file contains the following lines:
Define xml version and charset
xmlns:android=""
Almost all outer-most elements of resource file contain this line, 'xmlns' shorts for 'XML NameSpace', it declaims the name space to be used, then you can reference the attributes within this name space, ie. if you declaim to use android name space 'xmlns:android="xxx"', the contents between':' and '=' is alias of name space then you can reference 'android:text' later in the resorce file later.
In resources file, if you want to remove the default value of elements, just set its value to be "@null", ie.
android:background="@null"
/>