I am trying to learn how to create Android applications.
The first simple application to become a component of the larger application that I hope to build is to have a button on the screen where, when clicked, it adds something new to the view.
For instance:
Imagine a layout that has only a button:
[Create!]
When this button is pressed, a new line appears in the view, added to it:
[Create!]
A Something!
Subsequent clicks add more lines
[Create!]
A Something!
A Something!
Etc.
I made a LinearLayout and put a button in it, and attached a click listener to it. This all works great. I can’t figure out how to get the LinearLayout handle in the onClick function, with which I will add () a new TextView that says "A Something!"
? ? !