开发者

Why do we use @ and + symbol for creating id of a widget in Android?

开发者 https://www.devze.com 2023-03-17 07:27 出处:网络
What is the开发者_C百科 exact meaning of using @ and + symbol? The at-symbol (@) at the beginning of

What is the开发者_C百科 exact meaning of using @ and + symbol?


The at-symbol (@) at the beginning of the string indicates that the XML parser should parse and expand the rest of the ID string and identify it as an ID resource. The plus-symbol (+) means that this is a new resource name that must be created and added to our resources (in the R.java file)

Source: http://developer.android.com/guide/topics/ui/declaring-layout.html#id


see the android docs http://developer.android.com/guide/topics/ui/declaring-layout.html#id

0

精彩评论

暂无评论...
验证码 换一张
取 消