开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜