admin管理员组文章数量:1404944
I can't find any documentation or something like that about "?" "@" ":" symbol in android xml. It often using in themes and styles in android development. What is symbols exactly means can't understand.
Please give some docs?
I can't find any documentation or something like that about "?" "@" ":" symbol in android xml. It often using in themes and styles in android development. What is symbols exactly means can't understand.
Please give some docs?
Share Improve this question edited Mar 10 at 15:05 TylerH 21.1k79 gold badges79 silver badges114 bronze badges asked Mar 10 at 7:34 AbbosAbbos 1 1- 1 Documentation – tomerpacific Commented Mar 10 at 7:49
2 Answers
Reset to default 1These are pretty simple actually.
1. The "@" is the symbol which is used for resources or while declaring id, like @string/hello
, @+id/button
, or @drawable/my_drawable
.
2. The "?" is refers to a theme attribute or styleable content, like if you want to define any theme attribute in styles like color etc, you would use this. eg ?attr/colorPrimary
.
3.And the last ":" is commonly used in namespaces in XML, it is used to seperate the prefix in the namespace. for eg. android:layout_width="match_parent"
. Hence you would know that android is the prefix in the namespace declared.
Those links may help you,plz check.
https://developer.android/guide/topics/resources/providing-resources#ResourcesFromXml
https://developer.android/studio/write/vector-asset-studio#referring
本文标签: what is main quotquot quotquot quotquot symbol in android xmlStack Overflow
版权声明:本文标题:what is main "?" "@" ":" symbol in android xml - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744858520a2628920.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论