I\'ve found some code examples with the @android:id/xyz
attribute set instead of @+id/xyz
.
When and why is it necessary to use Android ids in
@android:id
indicates that the id is in the Android.r.id namespace
. So this is useful for ListActivities where they look for Android.r.id.list
by default.
The plus-symbol means that the resource is new and it must be created and added to the resources in the R.java
file.
Omitting the plus symbol references an already existing resource.
@android is used to access the default resources of Android . For example see this:
android:background="@android:color/transparent"
Using + sign means this resource must be added in R.java file while not using + sign means the resource already exist in R.java.