I am an Android beginner and I don’t understand what exactly the plus (+) before id reference means.
The tutorials I found on the web only say it is for new id reference and non-plus definition means it references the defined id. Could you offer an example to clarify my non-understanding of this tiny detail I am cracking my brain to get it right ?
I am an Android beginner and I don’t understand what exactly the plus (+)
Share
android:id="@+id/your_id"implies that SDK will generateR.id.your_idinteger resource (you can check the auto-generated R.java file).A refernce on
your_idwithout “+” (android:id="@id/your_id") is just a “pointer” to an already generated resourceR.id.your_id. So in order to use it you should have already defined it somewhere within the code.So, as a simple conclusion: “+” stands for addition/creation of an id, without “+” stands for using already created id.