+ sign simply means you are adding a new resource if just @, then you are using an already existing resource
android:id="@i+d/label" android:src="@drawable/icon" On Feb 17, 5:32 am, Syed Rizvi <[email protected]> wrote: > Thanks for the explanation Temitoe & Justin > > I shared a link and it was a tutorial which I was going through. I never > said that there is nothing on the android website. > > Peace > > Regards > > Irtiza > > On Tue, Feb 16, 2010 at 6:16 PM, Justin Anderson > <[email protected]>wrote: > > > *> There is no explanation of this & I was hoping if someone can explain > > it to me.* > > > Yes, there is an explanation of this: > > > "For the *id* attribute of a tag in XML, you should use a special syntax: > > "@+id/*somestringvalue*". The "@+" syntax creates a resource number in the > > R.id class, if one doesn't exist, or uses it, if it does exist. When > > declaring an ID value for an XML tag, use this syntax. Example: <TextView > > android:id="@+id/nameTextbox"/>, and refer to it this way in Java: > > findViewById(R.id.nameTextbox)" > > > This was taken directly from this page: > >http://developer.android.com/guide/topics/resources/available-resourc... > > > Please read the docs before declaring there is no documentation on > > something... > > > ---------------------------------------------------------------------- > > There are only 10 types of people in the world... > > Those who know binary and those who don't. > > ---------------------------------------------------------------------- > > > On Tue, Feb 16, 2010 at 3:19 PM, Temitope Akinwande > > <[email protected]>wrote: > > >> Answers inline > > >> On Thu, Feb 11, 2010 at 10:17 AM, Syed Rizvi <[email protected]> > >> wrote: > >> > Hi all > > >> > This is my first question. I am learning android very late I know & I > >> have a > >> > question. > >> Better late than never :) > > >> > 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. > >> The + sign means you are declaring a new id value to be added to the > >> id resource. > >> After declaring it this way, you can access the resource with id label > >> as follows > >> in code (R.id.label) > >> in xml (@id/label) > > >>http://developer.android.com/resources/tutorials/views/hello-relative... > > >> > There is no explanation of this & I was hoping if someone can explain it > >> to > >> > me. > > >> > Thanks > > >> > Irtiza > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "Android Beginners" group. > > >> > NEW! Try asking and tagging your question on Stack Overflow at > >> >http://stackoverflow.com/questions/tagged/android > > >> > To unsubscribe from this group, send email to > >> > [email protected]<android-beginners%[email protected]> > >> > For more options, visit this group at > >> >http://groups.google.com/group/android-beginners?hl=en > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Beginners" group. > > >> NEW! Try asking and tagging your question on Stack Overflow at > >>http://stackoverflow.com/questions/tagged/android > > >> To unsubscribe from this group, send email to > >> [email protected]<android-beginners%[email protected]> > >> For more options, visit this group at > >>http://groups.google.com/group/android-beginners?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Beginners" group. > > > NEW! Try asking and tagging your question on Stack Overflow at > >http://stackoverflow.com/questions/tagged/android > > > To unsubscribe from this group, send email to > > [email protected]<android-beginners%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

