1. Download our Official Android App: Forums for Android!

Apps *SOLVED*Reference Buttons from XML

Discussion in 'Android Development' started by daredeval756, Sep 24, 2011.

  1. daredeval756

    daredeval756 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Sep 14, 2010

    Sep 14, 2010
    1
    0
    5
    **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?
     

    Advertisement

Share This Page

Loading...