Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what does android:id="@+id/label mean?

 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

This is my first question on android. I am learning android very late I know & I have a question.

Can anyone explain me this statement below.

android:id="@+id/label

what does it mean by the plus sign I am going through the tutorial on android.

http://developer.android.com/resources/tutorials/views/hello-relativelayout.html

There is no explanation of this & I was hoping if someone can explain it to me.

Thanks

Irtiza
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain me this statement below.

android:id="@+id/label

what does it mean by the plus sign I am going through the tutorial on android.


+id/label means that your resource will have an id value = label and that label belongs to your application's name space.
There are many resources bundled with android.jar file and when referring to these resources you would say android:id = "@android:id/list" which means your resource will have an id value = list and that this value belongs to android name space.

Refer this.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

Now I understand. + sign only means when creating a variable or ID. Else when you use it you mention without the + sign.

Regards

Irtiza
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic