
我想问@android是什么意思,就像androID:ID =“ @ androID:ID / List.我在不同的androID示例和教程中都看到过,我也用谷歌搜索过.我发现的唯一解释是“ Android平台为我们提供了列表ID和空ID,因此,我们必须在ID前面加上androID:”,从http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html开始
谢谢.
解决方法:
android:
包含平台中包含的应用程序使用的资源类,并定义系统功能的应用程序权限.
您可以在自己的应用程序中直接使用这些R类中的某些资源,但通常应仅使用直接在应用程序中提供的资源,以提供没有外部依赖关系的内聚应用程序包.特别是,您不应使用androID程序包中的可绘制资源,因为它们在平台版本之间可能会发生变化,从而导致与设计产生不可预见的冲突.通常,样式是您应该直接从这些资源中使用的唯一资源.
因此,您通过在xml文件中使用“ @androID:ID”来使用androID资源(如列表,空等).
@ ID和@androID:ID的区别:
@+ID/foo means you are creating an ID named foo in the namespace ofyour application. You can refer to it using @ID/foo. @androID:ID/foomeans you are referring to an ID defined in the androID namespace.This namespace is the namespace of the framework. In this case, youneed to use @androID:ID/List and @androID:ID/empty because these arethe ID the framework expects to find (the framework kNows only aboutthe IDs in the androID namespace.谢谢.
总结以上是内存溢出为你收集整理的@android的含义全部内容,希望文章能够帮你解决@android的含义所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)