TextView defined in main.xml - how to "name" it to be able to use - setText() method?
- by Oliver Goossens
Hi,
I am exploring android and developement and I found one problem.
My app UI is defined in main.xml
I have 2 texts and 2 buttons defined - easy app.
I read that I may be able to change TEXT in the ACTIVITY using the setText() method.
And thats the problem - how do I POINT the setText() Method? How do I tell it to change a specified text?
If I would declare the TextView inside the Activity with NEW TextView NAME Object, I would just need to use NAME.setText(STRING)... But I didnt so i dont have anything like NAME of the object?
How can this be done? I read something about r.IDs but I truly dont have a idea how to use them, where to find them and how to implement it ....
Please advise
Thank you
Oliver