当前位置: 代码迷 >> Android >> Android 中 "@+id"的功用是什么?以及其与android:id的区别是什么
  详细解决方案

Android 中 "@+id"的功用是什么?以及其与android:id的区别是什么

热度:67   发布时间:2016-05-01 14:02:18.0
Android 中 "@+id"的作用是什么?以及其与android:id的区别是什么?

转:

?

android:[email protected],而@+id是新增加一个id

?

在Dev Guide -> User interface -> Declaring Layout 里面看到的。
??? 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). There are a number of other ID resources that are offered by the Android framework. When referencing an Android resource ID, you do not need the plus-symbol, but must add the android package namespace, like so: android:id="@android:id/empty"

  相关解决方案