I'm trying to learn how to build apps for Android.
The first simple app, which will become a component of a bigger app I hope to build, is to have a button on the screen where, when tapped, it adds something new to the view.
For instance:
Imagine a layout that only has a button:
[Create!]
When that button is pressed, the view gets a new row added to it:
[Create!]
A Something!
Upon subsequent presses, more rows are added
[Create!]
A Something!
A Something!
And so on.
I've made a LinearLayout and placed the button in it, and have attached a click listener to it. That all works great. What I can't figure out is how to get a handle on the LinearLayout in the onClick function with which I'll addView() the new TextView that says "A Something!"
Am I on the right track? What basic thing am I missing? Thanks!