I don't understand the "findViewById(R.id.myWidget)" syntax. I've
searched for an explanation and only found more advanced topics.
In graphic layout of main.xml I add a button and edit ID to "@+id/
myButton" and edit text to a new string.
I assume that somewhere an ID is recorded, similar to strings.xml that
holds the strings.
But in the .java file when I do this:
Button myButton = (Button)findViewById(R.id.myButton);
the "id" shows an error (red squiggle).
Is my concept of storage of IDs wrong?
Where are ID's stored? (Or is this beyond what a beginner should be
thinking about?)
How can I get the "id" in above line of code to recognize the
collection of IDs?
Much thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en