• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps *SOLVED*Reference Buttons from XML

**SOLVED By looking at some notes i sent to my self years ago**

Well this is embarrasing. I did android development throughout high school and got pretty decent at it. But as when I graduated I pretty much stopped coding.

Now im getting back into it a few years later.

Im stuck at the most basic thing I feel as if I could get stuck at.

Im just toying around right now, getting my feet wet.

Let's say I have a button and a plain text field.

From my MainActivity, how do I refernce 'cmdGo'(button) to alter the contents of of 'textbox' to say lets say "Hola Bro".

Obviously I need to set the onClick property for the button in the XML editor, but thats where I get stuck.

Any tips?
 
Back
Top Bottom